I am trying to move a body in cannon.js with a quaternion rotation by 100 units along a vector relative to its local rotation. However, I'm facing a problem with the positioning.
For example:
let body = new CANNON.Body({ mass: 0 });
body.quaternion.setFromAxisAngle(new CANNON.Vec3(0,0,1),(2*Math.PI)/6);
body.position.set(0,0,100); //this is incorrect
Using body.position.set(x, y, z);
seems to move the body relative to the world instead of the local rotation. I believe I need to incorporate a vector after applying the quaternion, but I'm struggling to find clear guidance in the cannon.js documentation.