How to produce realistic ground based Vehicular AI turning circles
Hi All,
I'm trying to get some ground-based vehicle AI in a game I'm working on. I've worked out how to get them to only move towards the player position when in range, and rotate to face the player. This is ok, but it lacks realism as they currently turn on the spot to face the player position rather than iterpolating rotation depending on movement speed. Obviously looks worse the closer the actors are to one another.
Sorry if this is fairly basic stuff for you guys from a code background.
I'm trying to get some ground-based vehicle AI in a game I'm working on. I've worked out how to get them to only move towards the player position when in range, and rotate to face the player. This is ok, but it lacks realism as they currently turn on the spot to face the player position rather than iterpolating rotation depending on movement speed. Obviously looks worse the closer the actors are to one another.
Sorry if this is fairly basic stuff for you guys from a code background.
Best Answer
-
RedCat Posts: 26
Well if anyone i interested I've found a sort of way of doing this...
Apply this formular in the Rotation speed: magnitude( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )
It basically clamps the rotation speed to the movement speed. looks ok and stops spinning on the spot.
I'm sure there are better ways though