convert from entity to vector?

Blitz3D Forums/Blitz3D Programming/convert from entity to vector?

Vorderman(Posted 2004) [#1]
Hello,

can anyone tell me how I can convert from an entity's orientation (retrieved with EntityPitch,EntityYaw and EntityRoll) to a normalised vector?

There must be an easy way to do this using the various Tform commands but I can't work it out.

thanks very much
James


big10p(Posted 2004) [#2]
Do you want the entity's heading vector? If so, I thinks it's just a case of:

TFormVector 0,0,1,entity,0



Vorderman(Posted 2004) [#3]
Yes, that seems to work - so simple too - I think I was expecting it to be a more complex solution.

Thanks big10p.


marksibly(Posted 2004) [#4]
The TForm commands were the best thing I ever did in Blitz3D - and I had no idea at the time!

Live and learn...


Vorderman(Posted 2004) [#5]
Certainly they are very helpful when using Blitz alongside Tokamak.


Matty(Posted 2004) [#6]
The TForm Commands are absolutely essential to some of the things I have been doing-my space battle program in particular. I would hate to have to transform vectors from one space to another space myself.


Damien Sturdy(Posted 2004) [#7]
I didnt know what they were all about.. Before, my code was efficient... but now, i realise it could be SOOO much more efficient!!!(i used to store the entities position, move the entity, get the new position, subtract from old position, then replace the entity... not as efficient as i used to think...!)