Sideways drift how to

I am trying to add power sliding to my flagrush mod and I'm not quite sure how to do it. I have partly adjusted the vehicle handle the way I need it to "even accidentally figured out a way to do donuts" I just can't get the sliding going. I want it to happen naturally taking turns at high speeds or deliberately by applying braking braking while turning at high speeds.

remember furballs could generate sideways drift but I am not sure how renanse did it.

some pointers would be nice.

thanks in advance.

Furballs simply did not change the direction of movement when you hit any keys but only accelerates in certain directions. You could do a similar thing for the bike: keep a portion of the current movement vector and combine it with the new desired vector. Something like this:

newMovementVector = a*oldMovementVector + (1-a)*desiredMovementVector

For a greater a you'd get more 'sliding'.

thanks man great help

just getting back to this, but how do I go about finding the movement vectors and apply the acceleration,tried a couple things but didn't get it working

irrisor said:

newMovementVector = a*oldMovementVector + (1-a)*desiredMovementVector

also known as linear interpolation, or lerp ;)

Initial D!!! Driftdooooo!!!

ahem  ://

guess I got some reading to do, any online recommendations, couldn't find anything useful in a forum search.

think it might have figure something out will see how it goes.

I am off from work these days so investing a bit more than half the ass I can usually invest in learning to code is a set goal…for now :slight_smile:

we'll see what happens