From c854fd5e8bf50b2d05f532579a30d64675d8e5df Mon Sep 17 00:00:00 2001 From: Noeri Huisman <8823461+mrxz@users.noreply.github.com> Date: Tue, 21 Jan 2025 00:39:16 +0100 Subject: [PATCH] Only apply position and orientation of spatial anchor space to anchored entity (#5633) --- src/components/anchored.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/anchored.js b/src/components/anchored.js index dbec5606075..71c3658d677 100644 --- a/src/components/anchored.js +++ b/src/components/anchored.js @@ -52,8 +52,9 @@ module.exports.Component = registerComponent('anchored', { refSpace = xrManager.getReferenceSpace(); pose = frame.getPose(this.anchor.anchorSpace, refSpace); - object3D.matrix.elements = pose.transform.matrix; - object3D.matrix.decompose(object3D.position, object3D.rotation, object3D.scale); + // Apply position and orientation, leave scale as-is (see aframevr/aframe#5630) + object3D.position.copy(pose.transform.position); + object3D.quaternion.copy(pose.transform.orientation); }, createAnchor: async function createAnchor (position, quaternion) {