You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]
}
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: