How do i make racing ai drift?

A better way to approach ai, is to use the same vehicle code. But in order to do that you need to encapsulate and cache the player input on a separate node, and set variables on the vehicle that will later be used in the physics process.

In this way, you write all the animation and driving logic once and then either place a ai node to drive it, or a player input node to drive it.

1 Like