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.
asked Jul 20 '17 at 03:15 AM in Using UE4
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.
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
answered Jul 20 '17 at 01:31 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here