From 73f1e5bd80822f9312dee94980983c9b56d57942 Mon Sep 17 00:00:00 2001 From: Quicksticks-oss Date: Tue, 23 Apr 2024 23:28:39 -0400 Subject: [PATCH] Fixed by doing rotation of quat. --- app/pages/PageEnigma/datastructures/clips/transform_clip.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/pages/PageEnigma/datastructures/clips/transform_clip.ts b/app/pages/PageEnigma/datastructures/clips/transform_clip.ts index 124a070bc1..1731e82bbb 100644 --- a/app/pages/PageEnigma/datastructures/clips/transform_clip.ts +++ b/app/pages/PageEnigma/datastructures/clips/transform_clip.ts @@ -133,10 +133,10 @@ export class TransformClip { if (this.keyframes.length > 0) { let first_pos = this.keyframes[0].position; let first_rot = this.keyframes[0].rotation; - let first_quat = new THREE.Quaternion().setFromEuler(new THREE.Euler(THREE.MathUtils.degToRad(first_rot.x), THREE.MathUtils.degToRad(first_rot.y), THREE.MathUtils.degToRad(first_rot.z))); + let first_quat = new THREE.Euler(THREE.MathUtils.degToRad(first_rot.x), THREE.MathUtils.degToRad(first_rot.y), THREE.MathUtils.degToRad(first_rot.z)); let first_scl = this.keyframes[0].scale; object.position.copy(first_pos); - object.rotation.set(first_quat.x, first_quat.y, first_quat.z); + object.rotation.copy(first_quat); object.scale.copy(first_scl); this.step_frame = 0; }