Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Only apply position and orientation of spatial anchor space to anchor…
…ed entity
  • Loading branch information
mrxz committed Jan 20, 2025
commit 60f8b1eb111e21596d49c66023742ea03757182a
5 changes: 3 additions & 2 deletions src/components/anchored.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading