🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Complex problems in simple locomotion

Started by
-1 comments, last by vanliv 23 years ago
Starting to implement and design the AI for a racing game, I decided to follow the simple and elegant ideas of Craig W. Reynolds in the "Steering Behaviours for Autonomous Characters". The whole idea is that the black box of various behaviours like target, flee, arrive etc returns to me a vector of "change" from my current speed, which I have to translate to specific braking, accelerating, steering, handbraking etc. To explain more take this example for the target behaviour: I create the vector from the car to the target, with length of MAX_SPEED (so this is my ideal velocity vector!). Then I just substract from it my current speed and return the result. The problems with that start from the point this vector has to be mapped on the car. I started by taking its projection on the axis of the speed (or it could be the forward axis of the car)and depending on it being possitive or negative deciding on braking, accvelerating or handbraking. Some hacks later I decided that there must be a logical mistake in all of this, as there where various special cases, f.i. the speed being very low and the target behind etc. Can anybody propose a change? Its really torturous as it is silly simple but the answer still seems to evade me. vag

This topic is closed to new replies.

Advertisement