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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Prevent Capsule To Snap To Ground When Walking?

Hi, i haven't seen a proper answer to this and i don't know if this is implemented yet but i've came across an annoying thing regarding the capsule component. When walking/stepping over surfaces greater than 0 degrees snaps to the ground, without any smooth approach. I've tried something on my own and plugged it in the tick event, but failed to achieve anything. Looking forward to your replies! alt text

Product Version: UE 4.14
capsule.png (154.6 kB)
more ▼

asked Feb 02 '17 at 03:07 PM in Using UE4

avatar image

18 18 21 26

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

1 answer: sort voted first

Go into your Character Movement settings in try tweaking the "max step height" variable.

more ▼

answered Feb 02 '17 at 03:33 PM

avatar image

313 16 25 55

avatar image Xanadron Feb 02 '17 at 03:39 PM

It is not that i can't step on a higher surface, i can but it snaps to it, there isn't any smooth transition to it.

avatar image Willard720 Feb 03 '17 at 03:37 AM

So is it like a bumpy, going up stairs sort of thing?

avatar image Xanadron Feb 03 '17 at 08:16 AM

Yes, when walking on any surface like this one. I can step on it but my capsule simply snaps over it. I forgot to mention that my camera is attached to the head.alt text

surface.png (2.1 MB)
avatar image Willard720 Feb 04 '17 at 09:58 AM

Okay, try doing something like this:

alt text

Have two line traces by your feet, one either than the other. The bottom one checks to see if there's a wall, and the second one checks above it. If the lower one hits and the yellow doesn't, then we know its a step.

We can set the lengths of both of them for the range of this.

With this information, we can lerp to the height of the yellow line trace, of course, saving its height before we begin the lerp. The height of the yellow line is the threshold for your step height

alt text

Or you can do it like this. Personally, I think this is a more stable version, considering we get more information. Here, we can get the height difference between the two hits, as well as their distance. And, same as before, we have height thresholds that determine if this is a step or not.

The alpha for the lerp needs to be a function off of the player's location (which will be using get location * forward vector). This way, it will feel like they're walking up a slope, even though there is none there.

Adjusting the line traces and other parameters can determine how steep or shallow the "slope" will be.

path.png (7.7 kB)
step.png (9.9 kB)
avatar image Xanadron Feb 04 '17 at 10:04 AM

Thanks for the answer. I'll give it a try.

avatar image Willard720 Feb 08 '17 at 05:04 PM

Did this work?

avatar image Xanadron Feb 08 '17 at 06:17 PM

I tried two methods but it didn't seem to work (and it might be completely wrong :) ). This is the scenario where the traces are going down. The timeline switches from 0 to 1. Method 1 alt text alt text Method 2 alt text alt text

1a.png (151.9 kB)
1b.png (122.7 kB)
2a.png (136.7 kB)
2b.png (204.8 kB)
(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