How to know when a non-character actor is grounded

Hi, I’m new with Unreal and blueprints and I’m struggling with this.

I have an actor that is a ball moved using AddForce that can jump using AddForce too. Now I need to know when the ball is grounded to avoid an air jump.

I found the “IsMovingOnGround” function but since my ball is not a character and it has no CharacterMovementComponent I can’t use this approach. Also, some people tell that I can use the Z component of the velocity but I have ramps so the Z can be different from 0 even when grounded.

Try a line trace down and check the length by calculating the distance between trace start and the hit point.

1 Like