Open hekto opened 9 years ago
@schteppe any thoughts on this?
Sorry for the late response.
Maybe use 3 larger boxes in the compound instead? Or change the scale of the scene, for example make your smaller box bigger. Or make the time step smaller.
You could also strategically put sphere shapes inside the compound that could help push the smaller box out.
The best solution for this problem would probably be continuous collision detection - but that is not implemented in Cannon.js yet.
I modified the compound demo to show what I mean. Basically, I put a thin box above the compound and drop it so it hits the compound right between
the eyestwo box shapes.When it collides, I would like the thin box to bounce off, just as it does if it hits the side of a shape, but instead it wedges itself between the two shapes in the compound.
Is there a way to avoid this behaviour?
The modifications i did to the demo was adding this code to around line 60 of compound.html (end of the Boxes scene):
See it here: http://marcus.hekto.net/cannon.js/demos/compound.html
v0.6.1