EntityY# ( entity[,global] )  

Parameters:

entity - name of entity that will have y-coordinate returned
global (optional) - true if the y-coordinate returned should be relative to 0,0,0 rather than a parent entity's position. False by default.

Description:

Returns the y-coordinate of an entity.

Example:

; EntityY Example
; ---------------

Graphics3D 640,480
SetBuffer BackBuffer()

camera=CreateCamera()
light=CreateLight()

cone=CreateCone( 32 )
PositionEntity cone,0,0,10

While Not KeyDown( 1 )

x#=0
y#=0
z#=0

If KeyDown(203)=True Then x#=-0.1
If KeyDown(205)=True Then x#=0.1
If KeyDown(208)=True Then y#=-0.1
If KeyDown(200)=True Then y#=0.1
If KeyDown(44)=True Then z#=-0.1
If KeyDown(30)=True Then z#=0.1

MoveEntity cone,x#,y#,z#

RenderWorld

Text 0,0,"Use cursor/A/Z keys to move cone"

; Return entity y position of cone
Text 0,20,"Y Position: "+EntityY#( cone )

Flip

Wend

End

Index