Game Development Community

MVeloctiy flucates too much

by gamer · in Torque Game Engine · 11/17/2006 (12:41 am) · 3 replies

When I update an aiplayer's velocity, mVelocity naturally goes down toward 0 and then goes back up again... What is causing this behavior? I understand that mVelocity is updated constantly by Player::updateMove(), but why goes back up again? does this have something to do with player's animation?
here's the log:
==>2702.setVelocity(10);
mVelocity is 8.382746 0.000000 0.001677

mVelocity is 5.187492 0.003981 -0.007965

mVelocity is 2.067505 0.000000 0.003454

mVelocity is 0.526408 0.000000 0.001389

mVelocity is 5.187492 0.003981 -0.007965

thanks for the help...

#1
11/17/2006 (3:49 am)
Your post is very vague and it is not clear what you are doing.

Are you setting the velocity to 0? Of course it will go back up to whatever it was.
#2
11/17/2006 (12:23 pm)
No, I am setting velocity to 10, so it goes down gradually to 0,(8->5->2->0..) then it goes to 5 again...
#3
11/24/2006 (3:11 am)
This looks perfectly normal for an AIPlayer following a path; it slows down as it nears the next destination node, then speeds up quickly when it starts moving again. I don't understand what your question here is.