x

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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How to detect stairs

My game has an unusual physics world, so that for some reason I have to implement movement of my character myself. I have no problem implement basic movement, jumping and climbing. But I dont know how to detect something like a stair or some small object on the ground which the character is supposed to move over. I used AddActorWorldOffset to implement all the motion and check Sweep Hit Impact Normal to see if the mesh can be climbed. I dont see how to check if the Hitting surface is "low" enough to be stepped over. I disabled all physics, since otherwise things go pretty wired.

Product Version: UE 4.16
Tags:
more ▼

asked Jul 20 '17 at 03:15 AM in Using UE4

avatar image

ROZOALEX
3 3 7 9

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hello,

I guess you could cast a second ray going upwards, starting from the impact location of the first hit, and check the distance between second impact and initial impact.alt text

Other possible solution I see would be to tag your stairs objects as 'stairs' and cast your hit result as stairs object and check if it's true or not?

Hope it helped

ueanswerhub.jpg (9.3 kB)
more ▼

answered Jul 20 '17 at 01:31 PM

avatar image

Cremuss
58 1 5 7

(comments are locked)
10|2000 characters needed characters left
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