Download

Checking if my actor is touching the landscape?

Hi,

So essentially- I’ve created a moving cube pawn, that, upon InputAxis forward moves in it’s local X direction. Problem is, when I run over a hill and the cube flips midair, I don’t want to be able to push forward and have the cube fly in whatever direction X is pointed at, so I figure the best workaround is to set my actor up so that I can’t press forward unless the actor is touching the ground.

Here’s my Level Blueprint code regarding this:
8a10734de53d415a3e2fb49e88e10c90a59fd77f.png

Here’s my Pawn Blueprint code regarding this:
f8657b19401a56ac0dc83497f9d57536d0d6cbd4.png

I’m sort of new to Unreal Engine, so explaining things would be very helpful and much appreciated. Thanks!