Jump to content
  • Advertisement
Sign in to follow this  

Upadting characters position with Arrive(Steering behaviour prob)

This topic is 3023 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So im doing steering behaviours at the moment. My Arrive algorithm works, in that it givese a smaller vector upon approach to a point. The problem im having is in the updating of the characters position. From looking around this seems fairly standard: void Guard::updateSteering(SteeringOutput steering, float time) { Velocity += steering.velocity * time; rotation = steering.rotation * time; position += Velocity *time; orientation += rotation*time; } But the problem is that towards the end, when the character is close to the point of arrival, the Velocity will have some value from previous executions. So even though steering.velocity (the velocity returned by the Arrival Algorithm), is 0 the character will keep moving. Can someone tell me how to sort this. Cheers [Edited by - discodowney on March 14, 2010 7:55:51 AM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!