Drive a Car Upside Down

Hello,
I hope everyone is doing well.
I have been working on car lately and I am facing some issues.
The car itself runs well, but what I am trying to do is to make it run upside down. First, I am having trouble flipping the car, each time it goes over an flip ledge, it either immediately flip back to normal, or start spinning out of control tile I hit the brakes. Second, after a really hard successful attempt to get the car upside down, it would not move at all and the wheel go through the ground. I am guessing UE4 default vehicle classes are not made for a car to run upside down.
The debug windows shows everything zeroed out except for the Wheel Omega.
I would appreciate your assistance on this matter.
Thank you!

60335-vehicle4.jpg

tldr;
1- How can I stop the car from spining out of control each time I try to flip it (driving it, not by code)
2- How can I stop the car from going back to it’s initial position when I try to flip it
3- How can I make the car run upside down? (there is some sort of wheel clipping)

I would say that it’s because the wheels are simulated by casting a ray down towards to the ground. It’s probably why the wheel and chassis bones need to facing positive down the X axis, and Z being up.

When your vehicle flips over, the raycasting is now pointing up to the sky, meaning it doesn’t realise that the “top” of the wheel is still on the ground. The big problem is that the physics of the wheels aren’t being simulated like a rigid body. If they were, then there would be no such thing as the “top” of the wheel.

You will need to find a way for wheel bones to flip over once the car flips over.

Not too sure to be honest. Having wheels as rigid bodies is something I’m still exploring myself. It means that my vehicle is being extended from the “Pawn” class, and all movement is done by setting forces and torques to a skeletal mesh. Not ideal. Collision for the wheels in PHAT is a “Single Convex Hull”.

If you wanted to keep the Vehicle class that you have now, you would need to do some checks for when the vehicle is upside down. Raycasting seems like it would do the job. How you would go about rotating the wheel bones - I’m not sure. When you steer the car, the wheels turn left and right via animations right? So I’d say that it would need to be done in the same way… Sorry I’m not more help, but I’m still quite new to all this UE4 stuff… :slight_smile:

Any ideas how I can do that? Possibly in blueprint?
Or how to simulate the wheels like rigid bodies?

Ok thank you :slight_smile:

You could use Transfor(Modify) Bone function in Anim Graph to rotate the wheels if that’s the way you want to go.

I tried it, it did not work