GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to produce realistic ground based Vehicular AI turning circles

RedCatRedCat Posts: 26Member
edited March 2012 in Working with GS (Mac)
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.

Best Answer

  • RedCatRedCat Posts: 26Member
    Accepted Answer
    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
This discussion has been closed.