Replies: 4 comments
-
I can try whether compiler options make a difference. At the moment I use this configuration: ./cmake_linux_clang_gcc.sh Release g++ -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DDOUBLE_PRECISION=ON -DDEBUG_RENDERER_IN_DEBUG_AND_RELEASE=OFF -DPROFILER_IN_DEBUG_AND_RELEASE=OFF -DUSE_AVX2=OFF -DUSE_LZCNT=OFF -DUSE_TZCNT=OFF -DUSE_F16C=OFF -DUSE_FMADD=OFF |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
The velocity of (0, 1, 0) happens to be exactly the default minimum velocity needed for an elastic collision to happen: JoltPhysics/Jolt/Physics/PhysicsSettings.h Lines 83 to 86 in de0b2e9 If you set that value to something less than 1 it will work. See #1406 |
Beta Was this translation helpful? Give feedback.
-
Oh ok. I wasn't aware of this setting. That explains the behaviour 😆 . |
Beta Was this translation helpful? Give feedback.
-
Hi, thanks for developing JoltPhysics and releasing it as open source!
I noticed a peculiar issue when testing a collision of a moving and a resting sphere.
If two spheres are colliding head on with restitution 1.0, I would expect them to exchange speeds.
If the spheres both have non-zero speed in collision direction it works.
However when testing collision with a resting sphere, both spheres end up sticking together and moving with the average initial speed:
I am using Clojure and C++. Here are the C++ methods for accessing Jolt.
The code for the test is as follows:
The issue persists even when setting gravity to [0, 0, 1]. I.e. the sticking behaviour occurs when the y-component of the speed of the second sphere is 0.
Kind regards
Jan
Beta Was this translation helpful? Give feedback.
All reactions