Closed nickolanack closed 5 years ago
I'm not 100% percent sure, but will test and if I'm correct I'll PR
my solution is wrong... this.android.getLocalRotation().eulerAngles() does not do what I thought. But I still think that the original method is not correct
updated android rotateBy method
rotateBy(by: ARRotation): void {
const currentRotation = this.android.getLocalRotation();
const rotateBy=new (<any>com.google.ar.sceneform).math.Quaternion(
new (<any>com.google.ar.sceneform).math.Vector3(
by.x,
by.y,
by.z
)
);
this.android.setLocalRotation((<any>com.google.ar.sceneform).math.Quaternion.multiply(currentRotation, rotateBy) );
}
I'm pretty sure that rotateBy method for android is not using quaternions correctly should be: