convert from entity to vector?
Blitz3D Forums/Blitz3D Programming/convert from entity to vector?
| ||
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 |
| ||
Do you want the entity's heading vector? If so, I thinks it's just a case of: TFormVector 0,0,1,entity,0 |
| ||
Yes, that seems to work - so simple too - I think I was expecting it to be a more complex solution. Thanks big10p. |
| ||
The TForm commands were the best thing I ever did in Blitz3D - and I had no idea at the time! Live and learn... |
| ||
Certainly they are very helpful when using Blitz alongside Tokamak. |
| ||
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. |
| ||
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...!) |