rotati need a little rotation help

Blitz3D Forums/Blitz3D Programming/rotati need a little rotation help

skyfire1(Posted 2005) [#1]
i have an entity that needs to turn around to reach a certain angle, right? i made the entity rotate with turnentity() so that it would point at the angle, right. but sometimes, the entity is a few angles from reaching it's rotation, and instead of turning a few angles, the entity turns the other way - the long way - to reach it's destinated rotation. how do
i make an entity find the shortest way to rotate. any help appreciated.


skyfire1(Posted 2005) [#2]
the topic title was suppossed to be "i need a little rotation help" but there was a typo.


Shifty Geezer(Posted 2005) [#3]
TrunEntity rotates the entity based in it's current orientation. Try using PointEntity instead to point the entity directly at where it needs to point.


Matty(Posted 2005) [#4]
Align to vector is a very useful command. Check out the TFormpoint/TformVector/TFormNormal commands as well as the DeltaYaw/DeltaPitch and VectorYaw/VectorPitch. With these commands you can do quite a lot.


KuRiX(Posted 2005) [#5]
DeltaYaw will make the job i think!