Skip to content

Commit c854fd5

Browse files
authored
Only apply position and orientation of spatial anchor space to anchored entity (#5633)
1 parent b700ca6 commit c854fd5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/anchored.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ module.exports.Component = registerComponent('anchored', {
5252
refSpace = xrManager.getReferenceSpace();
5353

5454
pose = frame.getPose(this.anchor.anchorSpace, refSpace);
55-
object3D.matrix.elements = pose.transform.matrix;
56-
object3D.matrix.decompose(object3D.position, object3D.rotation, object3D.scale);
55+
// Apply position and orientation, leave scale as-is (see aframevr/aframe#5630)
56+
object3D.position.copy(pose.transform.position);
57+
object3D.quaternion.copy(pose.transform.orientation);
5758
},
5859

5960
createAnchor: async function createAnchor (position, quaternion) {

0 commit comments

Comments
 (0)