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?
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?
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
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.
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.
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
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”:
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?
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:
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
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
Is it bad that I laughed? That would be more of a feature than bug. Kidding. Try my latest suggestion
It’s ok, it does look very silly
I’ve tried, but it didn’t fix the issue
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
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)