How do I check if the car is on the ground?

Hi guys!

So far, I get my car to pitch up and down, but there is a big problem. I can pitch when the car is in contact with the ground which just makes it play very weird, specially in turns as it tends to detect a slight ‘up’ input from the left stick.

I’ve been trying to use the ‘Is Flying’ and ‘Is Falling’ functions from the update component (Car Blueprint, vehicle component > get update component > ‘Is falling’ or ‘Is Flying’). How ever, when I leave the ramp or whatever static mesh I was on, the pitch doesn’t work, ie, the functions aren’t being triggered/outputing the correct Boolean value.
[The false output from ‘Is Falling’ is just for testing purposes. Without it, it never fires.]

I’ve been thinking of other ways to do so, and in the ‘showdebug vehicle’ command, there is a “SuspForce” for the wheels. Maybe I can detect when at least 2 of those have no suspension force in them which means the car is on the air, but I can’t find a node/object to get those values for use.

So, what do you epic guys propose?

How do I do traces? never done them before.

You could do a short trace from the car to the ground(an estimated distance like 10 units below tire contact point) and use it to find out if the vehicle is on the ground or not.

Right click in the BP and search “trace” then pick single line trace channel. Set it’s start and end locations and then you’ll get a bool that will return true if it hits something and false if it doesnt. Also make sure it is set to ignore self.

This worked.

Thanks to Jacky, I found a solution with Single Line Trace Channel.