Child true xyz position

Blitz3D Forums/Blitz3D Programming/Child true xyz position

Does anyone know how to get the entity's xyz world position when the entity is parented to another entity?

EntityX(Global=True)
EntityY(Global=True)
EntityZ(Global=True)


Just use:
PosX = EntityX#(childname, True)
PosY = EntityY#(childname, True)
PosZ = EntityZ#(childname, True)


Now PosX contains the global (world) X position of the child.
Change "True" to "False" (without the "") to get Local positions, which is the default.
Same goes for Y and Z coords.
Check out:
http://www.blitzbasic.com/b3ddocs/command.php?name=EntityX&ref=3d_cat