Archived

This topic is now archived and is closed to further replies.

NinjaCross

Re-routing with curves ??

Recommended Posts

NinjaCross    122
Hi !! Please Guys (sorry for my bad english), i''m making a game where i have a 3d map. In this map some units are able to move into. So, consider this situation: A unit is moving from point A (start point) and point B (target). But, Before the unit arrives to point B, target i redefined as point C (obviously different to B). How can i make the unit change its direction "steering" (tracing an immaginary curve, not a angle) ?? I tried with Bezier''s curves, but they''re too difficult to implement. Does exist a faster and easier solution ? Please, write every advice you know about it. Thanks !! //------------- Making Funny Fake Codes //-------------

Share this post


Link to post
Share on other sites
What you are refering to is known as ''non-holonomic'' motion planning. It''s like driving a car, you can''t just reverse direction and maintain the same speed. Therefore you have to implement some kind of physics model in your game, using the mass of your object, its current speed and stuff to calculate the curve it needs to make to reach that point. This can be kind of tricky though since it involves quite complicated math.

You might find more info at http://www.laas.fr/~sleroy/

******************************
Stefan Baert

On the day we create intelligence and consciousness, mankind becomes God.
On the day we create intelligence and consciousness, mankind becomes obsolete...
******************************

Share this post


Link to post
Share on other sites