Detecting Landed Actor with Physics Enabled
How would you go about detecting if your character is on the ground when physics simulation is enabled? Most methods I've found so far require physics simulation disabled. When enabled, things like isFlying don't seem to work anymore.
asked Jun 22 '18 at 05:43 PM in Blueprint Scripting
You could use a short ray cast from your Character, have the Ray Cast projecting out below the character a short distance so it acts as a sensor for anything it encounters below the character. In your character BP you will want to get the hit result from the Ray Cast, then you can use that as a trigger event for the functionality you want. There are plenty of excellent video tutorials on using Ray Casts if you're new to them. You could also use a trigger volume placed at the base of the character and get a hit result from that. From my experience it's up to you how you decide to handle detection but I'd always go for Ray Casts for precision and flexibility.
More info on your gameplay mechanics would be very useful. I'm fairly new to UE4 and programming myself but another more informed member here should be able to advise you better if you provide more specifics. Hope I was of some help.
answered Jun 23 '18 at 02:15 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here