what is the solid plane in cannon.js?

23 Views Asked by At

I drop any three.js objects on the cannon.js plane and I want them to bounce. but I am struggling to understand below z=0 and 'solid'. Here's my visaulization

enter image description here

floorBody.quaternion.setFromAxisAngle(new CANNON.Vec3(-1, 0, 0), Math.PI/2) I don't think it should work based on my understanding, but somehow it still works.

I expect floorBody.quaternion.setFromAxisAngle(new CANNON.Vec3(-1, 0, 0), -Math.PI/2) By my understanding, the plane is xy aligned and -Math.PI/2 will do 90 degrees clockwise rotation. Because of infinite plane for negative z axis direction, 'solid' part should face negative y direction in order to make objects bounce on the plane.

0

There are 0 best solutions below