Physics Body goes crazy when going over slope (video)
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?
asked Aug 05 '18 at 11:26 AM in Everything Else
If anyone has the same problem, here's how I fixed it in my case:
Version UE4.20 Go to Project settings -> Physics
Set Max Substep Delta Time to 0.008
Set Max Substeps to 6 (could be optional, but this worked for me)
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
answered Aug 05 '18 at 12:51 PM
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
answered Aug 05 '18 at 05:09 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here