…

In regards to the project: https://playcanvas.com/project/793652/overview/cannonjs-physics-integration
Check the API: https://playcanvas.com/editor/code/793652?tabs=47277506
An entity will have cannonBody
property after postInitialize and from there, you can use the cannon.js API to modify it: https://schteppe.github.io/cannon.js/docs/classes/Body.html
You can see an example setting the rotation in the teleport function:
CannonWorld.prototype.teleport = (function () {
return function (entity, position, rotation) {
entity.cannonBody.position.set(position.x, position.y, position.z);
if (rotation) {
entity.cannonBody.quaternion.set(rotation.x, rotation.y, rotation.z, rotation.w);
}
entity.cannonBody.velocity.set(0,0,0);
entity.cannonBody.angularVelocity.set(0,0,0);
};
}());