Control Speed of AiPlayer Rotation?
by Steve Acaster · in Torque 3D Professional · 08/16/2011 (8:31 pm) · 4 replies
After noticing that AiPlayers turn "instantly" when given a target/location to aim at, I was looking through the code (aiplayer.cpp and player.cpp) to try and find out how to control the speed of this movement and slow it down to mimick turning to face the target/location (like the player's mouse sensitivity). Whilst I found the code that sets the rotation (pitch and yaw) I didn't see anywhere that controlled the speed (or if it's in that function I didn't understand the math ...).
Any pointers would be appreciated.
Any pointers would be appreciated.
About the author
One Bloke ... In His Bedroom ... Making Indie Games ...
#3
08/17/2011 (6:15 am)
Nice - a full worked solution ;). Thanks!
#4
Wonder how I control Ai rotation speed? yaaaawwwwn ... I'll just post asking for pointers and get some zeds.
Sometime After Midday:
Slurp ... yawn ... hey the faeries did it whilst I was asleeep! Shame they didn't cleanup the house whilst they were at it, but hey.
I wish more things I wanted were worked out in this manner ...
08/17/2011 (7:03 am)
5am: Wonder how I control Ai rotation speed? yaaaawwwwn ... I'll just post asking for pointers and get some zeds.
Sometime After Midday:
Slurp ... yawn ... hey the faeries did it whilst I was asleeep! Shame they didn't cleanup the house whilst they were at it, but hey.
I wish more things I wanted were worked out in this manner ...
Torque Owner Daniel Buckmaster
T3D Steering Committee
Which set the values of the move to be passed out. That's a convenient location to do some mediation - for example, clamping the values to some absolute bounds.