Quaternion problem found:

With some help from schteppe the creator of Cannon.js it turned out that my for loop and quaternion.copy code did work fine. Which was tested by setting a rotation velocity on the sphere so that before each world step it will rotate slightly. This told me that it was a problem with the collision and not the quaternion update.

The problem seemed to stem from a bug inside Cannon.js. When a scene has no gravity the friction of the engine doesn’t work because Cannon uses a approximation for friction force that depends on the length of the gravity vector. So when gravity is set to zero friction forces are also zeroed.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s