# Questions Concerning AI Motion Jerkiness

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

## Recommended Posts

Hello all, I am currently enduring a severe headache as a result of a problem that I cannot solve. I am currently hard at work on the AI logic for our cartoon racing game, and am having issues with the smoothness of its motion. The logic is fine. We are using a physics simulator and are providing the car input values for turning based on the next waypoint (we are using a system of waypoints for navigation). The problem is, as is probably self-evident, that the car will turn to face a waypoint, drive to it, turn, drive, turn, drive, producing very jerky, angular behaviour. I was thinking of introducing a Catmull-Rom spline into the whole thing, but I'm not really sure how I would go about doing it. I know that I need a smoother motion, I'm just not sure how to obtain it without generating thousands of waypoints. If you require some code snippets, I'll post whatever is needed. Thanks a lot. This problem is driving me insane. Best Regards, Julian Spillane

##### Share on other sites
Instead of using splines, try using a more simple method:
Every frame (or when ever the AI is updated) have the cars turn towards the waypoints by a small amount.

For example, if the cars turn a few degrees towards the waypoint every ten frames, the motion will appear much more smooth.

##### Share on other sites
This is more of an "easy" solution, but why not drive along the path defined by the current location and the next two waypoints so that the path is along a circle? The equation for such a circle is here. Just make sure you are using only way points away from the AI, if you keep using a waypoint once it is nearby you will get eratic behaviour with this.

##### Share on other sites
Hi,

You should check out steering behaviors.

Hope this helps

Eric

##### Share on other sites
Thanks a lot! This paper was exactly what I needed.

:)

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5

• 9
• 19
• 20
• 14
• 14
• ### Forum Statistics

• Total Topics
633380
• Total Posts
3011578
• ### Who's Online (See full list)

There are no registered users currently online

×