Rotating a Vector by means of a Quaternion

Hi…

using cannon.js I needed to rotate some bodies (otherwise the wheels fly onto the body of a car during the first few moments of your scene)… the following code rotates a vector by using a quaternion. More insights into quaternions you can find here

http://math.stackexchange.com/questions/40164/how-do-you-rotate-a-vector-by-a-unit-quaternion

Have fun…

CU

0xff

Leave a Reply

Your email address will not be published. Required fields are marked *