bulletphysics / bullet3

Bullet Physics SDK: real-time collision detection and multi-physics simulation for VR, games, visual effects, robotics, machine learning etc.
http://bulletphysics.org
Other
12.49k stars 2.87k forks source link

Bug in btGImpactQuantizedBvh::refit function with scaling the mesh #4588

Open kochol opened 6 months ago

kochol commented 6 months ago

I have a program that uses btGImpactMeshShape to create a mesh shape and when I scale it the collision detection won't work anymore.

But when I remove the below if and call the m_box_set.buildSet() function everything works as expected.

https://github.com/bulletphysics/bullet3/blob/6bb8d1123d8a55d407b19fd3357c724d0f5c9d3c/src/BulletCollision/Gimpact/btGImpactShape.h#L86-L89

I think the bug is in the below function.

https://github.com/bulletphysics/bullet3/blob/6bb8d1123d8a55d407b19fd3357c724d0f5c9d3c/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.h#L101-L110