[solved] CollisionSphere not resting on CollisionBox


I have physics running using PhysicsCollisionHandler. There’s a CollisionBox and a CollisionSphere right above it, the latter falling onto the former. I’d expect the sphere to come to a rest onto it once it collides with the box, but it doesn’t - its always set about getPos() + (0,0,1) upwards and starts to fall down due to gravity again exactly at the point of collision. The minimal example looks like this:

Could someone please explain that behavior? Or, even better, hint at a fix? :slight_smile:

Hmm. Looks like some kind of bug in CollisionBox to me. This code was implemented by a student over a summer, and apparently it still has a few bugs in it.

Try using something other than a CollisionBox, for instance a cube constructed out of CollisionPolygons.

Edit: FYI, I just tracked down the bug in question and committed a fix for it. The fix will be available in the next buildbot release.


Thank you very much!

As collisions from CollisionBox aren’t that common yet I’ll probably go for 6 polygons.