Download

Vehicle stuck on roof

(Blueprint advanced vehicle)

Hi all, I searched and just couldn’t find it.

When vehicle is stuck on its roof, how to I flip it upright? There has to be a built in way, or something in the documentation that I am not finding that explains how to do this? Right now I have to escape to cancel the game and start over…

Thanks in advance,

~ Matt

You could set something like this up, on “F” or what ever key you specify it will flip the car back onto it’s wheels

ca9d25151ceb1acea604a813610e52637f3b060f.png

Thanks for the input. Which blueprint would this go into? There are a number for the vehicle so I don’t want break the world by putting it in the wrong location.

Would this give the graceful flip animation often found in video games? If not, how could I take your idea and create that effect?

I would think many people with vehicle games are looking to not be stuck on the roof. What are you all doing to solve this problem? Are you doing what NDFJay said above, are you somehow telling the vehicle to not stop on the roof (if so how?).

I’m calling this from the vehicle BP but you could call it from the player controller or level blueprint if you know how to link between them.

This is also not a grace full transition, to make it gracefull you could use an Tinterpto like so

9a7b736c5616a42aedd1e364c002966409d6c2ac.png

This will gracefully rotate the car to it’s wheels as long as F is pressed, when it’s released it will stop rotating

Alternatively this is how you would do it in level blueprint for any car you’re controlling at that time

Zv5YWa0.png

And finally, autoflip when the car is on it’s roof, preventing it from landing and stopping on it’s roof, it will just flip onto it’s wheels automatically

rd7WH5T.png

Thought I would throw that in there so you don’t have to mess with all your vehicle blueprints, you can just have that in your level blueprint and you’re good to go

Thanks NDFJay - I may not get to all of it today, but I am going to deconstruct what you wrote up tomorrow. One stumbling block at the start I am having, when I pull a node off my mesh (inside the Vehicle Blueprint Event Graph) I only get a “Return Value” output node. You seem to have return value location, rotation, and scale. What am I doing differently…

What I have:

flippingPart1.JPG

Thanks again for your write up. I will give it a solid effort before I ask again for your help.

Thanks NDFJay - I may not get to all of it today, but I am going to deconstruct what you wrote up tomorrow. One stumbling block at the start I am having, when I pull a node off my mesh (inside the Vehicle Blueprint Event Graph) I only get a “Return Value” output node. You seem to have return value location, rotation, and scale. What am I doing differently…

What I have:

flippingPart1.JPG

Thanks again for your write up. I will give it a solid effort before I ask again for your help.

Thanks NDFJay - I may not get to all of it today, but I am going to deconstruct what you wrote up tomorrow. One stumbling block at the start I am having, when I pull a node off my mesh (inside the Vehicle Blueprint Event Graph) I only get a “Return Value” output node. You seem to have return value location, rotation, and scale. What am I doing differently…

What I have:

flippingPart1.JPG

Thanks again for your write up. I will give it a solid effort before I ask again for your help.

This is in reference to your top image. You also seem to have no spaces to your get world transform in the blueprint function name…I think I am doing something slightly different than you.

If you rightclick the return value you can split the return struct into location, rotation, scale,.

each of those can also be split the same way to get their x,y,z values.

You can also do this on input values

1d730b852c0cf65051cde659ecca1c54c650aad4.gif

ae9277dec33a638bb9bb256db0b5211060ee4f48.gif

Thanks NDFJay - worked perfectly, and I learned about splitting structs pins. Appreciate it the text and visual help.

Based on the lack of info I found on the subject when I searched, you may have created the gold standard / timeless post on how to solve this problem. Your post will live on…forever…maybe.

~ Matt