I'm writiing a code segment where I need the direction that the mesh's Z axis is pointed. is there an easier way to do it than this?
PositionX = entityX(mesh)
PositionY = entityY(mesh)
PositionZ = entityZ(mesh)
moveentity mesh, 0, 0, 1
;components of z axis vector
VectorX = entityX(mesh) - PositionX
VectorY = entityY(mesh) - PositionY
VectorZ = entityZ(mesh) - PositionZ
positionentity mesh, PositionX, PositionY, PositionZ, true
-this would work(or at least something like it), but it buugs me. Is there a way to do it without moving the mesh?
PositionX = entityX(mesh)
PositionY = entityY(mesh)
PositionZ = entityZ(mesh)
moveentity mesh, 0, 0, 1
;components of z axis vector
VectorX = entityX(mesh) - PositionX
VectorY = entityY(mesh) - PositionY
VectorZ = entityZ(mesh) - PositionZ
positionentity mesh, PositionX, PositionY, PositionZ, true
-this would work(or at least something like it), but it buugs me. Is there a way to do it without moving the mesh?