dxVectorPitch#(x#,y#,z#)

Parameters

x# - x vector length
y# - y vector length
z# - z vector length

Description

Returns the pitch value of a vector.

Using this command will return the same result as using dxEntityPitch to get the pitch value of an entity that is pointing in the vector's direction.

See also: dxVectorYaw, dxEntityPitch.

Example

; dxVectorPitch Example
; -------------------

dxGraphics3D 640,480
dxSetBuffer dxBackBuffer()

; Set vector x,y,z values
vx#=2
vy#=2
vz#=0

camera=dxCreateCamera()
dxPositionEntity camera,0,0,-5

light=dxCreateLight()

cone=dxCreateCone()

; Rotate cone so that it points in the direction it is facing
dxRotateMesh cone,90,0,0

pivot=dxCreatePivot()

; Position pivot to represent a vector
dxPositionEntity pivot,vx#,vy#,vz#

; Point cone in direction of pivot. It should now have same pitch value.
dxPointEntity cone,pivot

While Not dxKeyDown(1)

dxRenderWorld

; dxPrint entity pitch value and vector pitch value. Both should be identical.
dxText 0,0,"Entity pitch: "+dxEntityPitch(cone)
dxText 0,20,"Vector pitch: "+dxVectorPitch(vx#,vy#,vz#)

dxFlip

Wend

End

Index