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"

Physics Body goes crazy when going over slope (video)

https://youtu.be/azIc58hZ-MI

In this video you can see my character going up/down stairs. The collision of the stairs is a simple slope. Whenever the character starts going up the slope or leaves the slope, her physics go ballistic.

Is there any solution to fix this issue?

Product Version: UE 4.19
Tags:
more ▼

asked Aug 05 '18 at 11:26 AM in Everything Else

avatar image

Blue669
246 29 35 54

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

3 answers: sort voted first

If anyone has the same problem, here's how I fixed it in my case:

Version UE4.20 Go to Project settings -> Physics

Enable Substepping

Set Max Substep Delta Time to 0.008

Set Max Substeps to 6 (could be optional, but this worked for me)

more ▼

answered Aug 27 '18 at 10:55 PM

avatar image

Blue669
246 29 35 54

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

I'm not sure, others may have better feedback here, but in general, I see the physics simulation get overzealous like that on attached bodies when the differential in the masses between the objects is too significant. In my experience so far it seems to be about a magnitude of 10(-ish) that I find is the threshold for stable physics simulation between objects. For example, if I have a physics body of 100kg mass and attach with a constant another physics body, I have found that the second, constrained, physics body only remains stable if its mass is between 10kg and 1000kg. If the difference exceeds a magnitude of ten, I see instability in the simulation.

hope that may be helpful

-Elder

more ▼

answered Aug 05 '18 at 12:51 PM

avatar image

ElderAbyss
11 1 1

avatar image Blue669 Aug 05 '18 at 01:22 PM

Not sure if I understand how to apply that knowledge. I've tried using mass scale on the whole physics asset (from 1 up to 1000000000) but the result is exactly the same. If I manually set the kg on the physics body that is affected to anything from 0.001 to 100000 the result still does not change at all.

avatar image ElderAbyss Aug 05 '18 at 01:44 PM

I'm not sure then Blue.

The difference in masses for constrained bodies was the only thing I could think off right off that could be causing that instability. Beyond that, I don't have anything else to offer that may help you. If it were me trying to work this out, I would start by making a new branch, rebuilding that physics setup (at least baseline everything to defaults), and start going back through it setting by setting adjusting and testing to find the problem (as always make a new branch to start debugging on this so you can go right back). From here I think it may take some hands-on with your setup to solve, but the constraints setup and configuration would be the next area I would look after I made sure the masses of my physics bodies are set to workable settings.

Someone with more knowledge on this type of setup may be more helpful. I hope you get it sorted out.

-Elder

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

This is a very, very simple fix. Instead of using stairs, use a plane, a slope as you are saying. This will help the abrupt camera movement too. If this isn't the problem and you are already using a plane, (or a modified cube), try messing around with the character movement component, maybe something with the max step height or something. But only and only after you try using a plane or a modified cube as collision, and not plain stairs. And if you are using a slope, you are in big trouble, as the camera movement is kinda odd too. Wait, actually, I see what the problem is now. You ARE using a plane, but and the abrupt movement seems to occur at the ends of the slope. In that case, there isn't much to do except use normal stair collision and change the max step height. Just mess around with the character movement component and it will be good. Getting movement right is a very tedious process

more ▼

answered Aug 05 '18 at 05:09 PM

avatar image

DanDC1
41 2 5

avatar image Blue669 Aug 05 '18 at 05:39 PM

Thanks for your post. I've tried tweaking the collision several times, but even when I add "softened" slope steps, the glitch still happens. On the bottom I can almost get rid of the issue by adding these softeners, but on the top it's impossible, because even the slightest change of angle makes the character movement jerk, causing this glitch to occur.

Here's the collision before and after the "softener": alt text alt text

I also did try tweaking the Character Movement component, but I couldn't find any settings that would apply to this issue. Do you know any specifics that I should try?

avatar image DanDC1 Aug 05 '18 at 06:00 PM

Hey, I just experimented with some things in UE4 right now. I came across a fix: Setting the max step height to 45 or less (but not less than 10), perch radius threshold (important): A very large number and that's all. Just a very high perch radius threshold which means your character cannot hang onto cliffs, meaning it will fall off and cannot climb unless the capsule is directly above the surface, I hope this helps, if not, contact me again

avatar image Blue669 Aug 05 '18 at 06:08 PM

I've tried setting Max Step Height anything between 10 and 45 (which it was), I've also tried setting Perch Radius anything between 999999 and 0 (which it was), but it didn't fix it. I then tried changing Perch Additional Height to anything between 0 and 999999, but after it also didn't fix the issue, I reset it back to default (how it was).

No fix yet :(

avatar image Blue669 Aug 05 '18 at 05:55 PM

If I set the collision to complex as simple (which is now using the actual stairs as the collision instead of the slope), the glitch is even more ridiculous:

https://youtu.be/O6tcH7-pLSA

avatar image DanDC1 Aug 05 '18 at 06:09 PM

Is it bad that I laughed? That would be more of a feature than bug. Kidding. Try my latest suggestion

avatar image Blue669 Aug 05 '18 at 06:11 PM

It's ok, it does look very silly :D

I've tried, but it didn't fix the issue :(

avatar image DanDC1 Aug 05 '18 at 06:53 PM

I'm really sorry, but this is about as much as I could help, I wish you will find a solution and share it with us

(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