How would I recreate a drifting system like Mario Kart 8's?

I currently have a third person character setup with tank controls, and I’ve been trying to add Mario Kart 8 like drifting to them, but I cannot figure out how to do it and I can’t find anything online that is what im looking for or explains it simply enough for me to understand it.

What I’m looking for and can’t figure out myself is:

  • The drift being controlable. Once I start drifting in once direction, and I turn the other direction, I dont want it to cancel the drift or start drifting in the other direction.

  • Once I get that figured out I would like to add the mini turbos like Mario Kart, where if you hold the drift you get a speed boost, and the longer you hold it the bigger the boost.

I hope someone can help me figure this out. With blueprint examples would be preferable because I’m still not great at ue5.

I had a few more attemps and this is the best I got. It’s pretty much there, but its buggy. I can drift one way and counter steer the other, but its only getting the direction its being told to drift in once you’re holding down the drift button. If I were to make it so it was getting the drift direction on event tick the drifting no longer works.

How do I make it know what way im wanting to drift. Im stuck

This now works very well with keyboard, however not with a controller. If I move the left joystick to turn left or right slightly diagonally, the camera turns in the opposite direction.

Other than that, the drift works well. Previously it would only check for the drift direction while drifting. Now its always checking for the drift direction, but it only locks it in once the drift button is pressed. This means you can press drift then hold a direction and it will go in that direction making it feel more responsive.

Fixed the joystick bug

can now only drift while moving