How can I change the pitch of a car while in the air?

Hey again!

What I want to do is simple. I want to be able to control the pitch with a gamepad right stick while I am in the air. So that I can control and get in the best position for the landing after jumping/falling from a ramp/track

I currently have this line of script but it ain’t working, and I can’t figure out why.

My thought was, get the input, and check if it is higher than 10%. If that’s true, then check if the cair is flying (moving through a non fluid volume without resting on the ground). If all that is true, then I get the vehicle component, from it the updated component, and then I get physics angular velocity. reak that up and grab the w value (Which I think it’s the pitch). I set the Y value to the axis input times 1000 (Just checking if it does anything, I can tweak the sensitivity later on) and pput everything back how it was with Set Physics Angular Velocity and I play a sound just to be sure it fired.

Let me know if there is an easier way to do this.


I’ve got this to work. The problem was that I was using the wrong stick. This is the updated blueprint (I still have issues with [detecting when the vehicle is in the air.][1])

If you are trying to do this yourself. Let me know. The maths aren’t that straight forward and might require some explanation.

Hi, I was personally able to correctly detect when the vehicle is in the air, but I am unable to work out how to rotate the vehicle in air like you did.

The trick to detecting whether the vehicle was in the air is to do a Box Trace downwards, and then use a branch to detect whether the box is colliding with anything. If it isnt colliding, then your vehicle is in the air.

Hey Motanum,

i know this post is about two years old but i have a question… i already implemented my own air control but it’s not that smooth and it looks kinda static… Is your code fixing that ? If yes, could you tell me what your get “Get Mag Ang”-function is calculating? Hope you write back.