[v1] Sphere falling through StaticMesh with CCD
Posted: Wed Nov 18, 2020 7:35 pm
I've been trying to make a golf like game in Unity using v1 BEPUphysics but have noticed on rare occasions the ball just falls completely through the static mesh ground (always on impact from a high, not while rolling along).
download/file.php?mode=view&id=360
The vast majoity of the time it bounces correctly and rolls off as expected. The only modification I have made is updated the libraries to target .Net framework 4.6. I have tried both v1.5.1 off GitHub and also the fixed point math version (https://github.com/sam-vdp/bepuphysics1int) - they both exhibit the same issue.
The ball is created using the Sphere class:
Radius 0.036322
Mass 0.148835
Angular/linear damping 0.0 (just for this test)
Friction 0.5
Bounciness 0.9
Position update mode continuous
Ground is created using the StaticMesh class:
Friction 0.5
Bounciness 0.5
Global:
DeactivationManager.VelocityLowerLimit 0.3
DeactivationManager.LowVelocityTimeMinimum 0.1
CollisionDetectionSettings.AllowedPenetration 0.0
Gravity {0.0f, -9.8, 0.0f}
I've also tried messing with the various settings in the MotionSettings class but haven't had any luck.
Any advice or suggestions would be massively appreciated! (I have a 2019.4 Unity test project if anyone fancies having a look!)
download/file.php?mode=view&id=360
The vast majoity of the time it bounces correctly and rolls off as expected. The only modification I have made is updated the libraries to target .Net framework 4.6. I have tried both v1.5.1 off GitHub and also the fixed point math version (https://github.com/sam-vdp/bepuphysics1int) - they both exhibit the same issue.
The ball is created using the Sphere class:
Radius 0.036322
Mass 0.148835
Angular/linear damping 0.0 (just for this test)
Friction 0.5
Bounciness 0.9
Position update mode continuous
Ground is created using the StaticMesh class:
Friction 0.5
Bounciness 0.5
Global:
DeactivationManager.VelocityLowerLimit 0.3
DeactivationManager.LowVelocityTimeMinimum 0.1
CollisionDetectionSettings.AllowedPenetration 0.0
Gravity {0.0f, -9.8, 0.0f}
I've also tried messing with the various settings in the MotionSettings class but haven't had any luck.
Any advice or suggestions would be massively appreciated! (I have a 2019.4 Unity test project if anyone fancies having a look!)