Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.


Product Version: UE 4.19
more ▼

asked Jun 22 '18 at 05:43 PM in Blueprint Scripting

avatar image

6 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Jun 23 '18 at 02:15 PM

avatar image

1 1

avatar image pftq Jun 23 '18 at 02:50 PM

Thanks - I've seen mention of raycasts. It just seems a bit expensive to be doing just to know if your actor has stopped falling or is landed. I'd be curious how the isFalling method normally works and whether it can be reimplemented to work with physics simulation enabled.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question