Obtaining a vector for direction of an entity

Blitz3D Forums/Blitz3D Programming/Obtaining a vector for direction of an entity

Shifty Geezer(Posted 2004) [#1]
Is there s function to return the vector of an entity's direction? I can't find one and best I can gather one has to manually record an entity's direction, creating a custom vector and rotating that to match changes to an entity.


Tom(Posted 2004) [#2]
;Transform a forward vector from entity space to world space
TformVector 0,0,1,entity,0

;Get the entitys vector in world space
vx# = TformedX()
vy# = TformedY()
vz# = TformedZ()


Shifty Geezer(Posted 2004) [#3]
Clever! Thanks.