Do anyone know how to block objects from going below Z:0 in Cannon.js ?? Like if there is a platform
Padmanabh82 opened this issue Β· comments
Please someone help me π
Check out the single_body_on_plane
example: https://pmndrs.github.io/cannon-es/examples/single_body_on_plane
To look at the code, click the icon on the bottom right.
Also check out cannon-es, the maintained version of cannon.
@marcofugaro the solution was not working for me. but these worked for me
cannon: new CANNON.Body({ mass: 0, shape: new CANNON.Plane(new CANNON.Vec3(1/ 2, 1 / 2, 1 / 2)), })
but how is this working ?? it is working in whole world but it shouldn't work
and what features cannon-es provides ??
and what features cannon-es provides ??
it's maintained, bugs get fixed, prs merged. this version is not maintained, the last time someone made a change was 6-7 years ago. you should use cannon-es.