Translate Entity help

Blitz3D Forums/Blitz3D Beginners Area/Translate Entity help

Ross C(Posted 2003) [#1]
ok, first off i know what translate etity does. It moves an entity along the x y z axis regardless of which way it is facing. What i don't get is what the gloabl/local flag is for.

I thought the whole point of translate entity was to move entity's along the axis's. Anyone care to slap some sense into me and explain the difference?

Thanks in advance


(tu) sinu(Posted 2003) [#2]
when you use translateentity you move in world coordinates which never change. Maybe with the global/local flag it will use the entity coordinates ie the x value will shift the entity left/right and the z value will shift the entity forwards/back not matter which way it faces. In other words it will either use world or entity coordinates.


Ross C(Posted 2003) [#3]
oh rite, thanks for the explanion :o)


Ken Lynch(Posted 2003) [#4]
Sinu, that's not quite the correct explanation. Local coordinates only makes a difference if the entity is parented, so TranslateEntity will use the parent entity's axes and with the global flag true it will always use the world axes. You will only notice a difference if:

1. The entity you want to translate has a parents
2. That parent is not aligned with the world axes


Ross C(Posted 2003) [#5]
oh rite cool, thanks Ken. that could be very handy :)


(tu) sinu(Posted 2003) [#6]
@Ken, i put "maybe" and wasn't sure myself so thanks for the proper explanation :)