-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
For some reason Cannon's own toEuler() function does not work as expected, so I had to use the function from this issue: schteppe/cannon.js#211, in order to get the right rotation to use for the Spark Objects. I am using the latest Spark AR version, btw
function quatToVec3(x,y,z,w){
var ax = Math.atan2(-2*y*z+2*x*w,1-2*x*x-2*y*y);
var ay = Math.asin(2*x*z+2*y*w);
var az = Math.atan2(-2*x*y+2*z*w,1-2*y*y-2*z*z);
return [ax,ay,az]
}
dukuo and johannesrave
Metadata
Metadata
Assignees
Labels
No labels