Skip to content

Using spatial anchor causes scale to get overruled #5630

@NoTuxNoBux

Description

@NoTuxNoBux

Description:

I have a simple a-box with scale set to something that is not the default. If I place anchored on it and call createAnchor as per the documentation, my scale gets set back to a uniform 1.

It appears that tick in the anchored component does:

pose = frame.getPose(this.anchor.anchorSpace, refSpace);
object3D.matrix.elements = pose.transform.matrix;
object3D.matrix.decompose(object3D.position, object3D.rotation, object3D.scale);

This seems to overrule the entire matrix of the object, including the scale. I verified this by placing const oldScale = object3D.scale.clone(); before the code and object3D.scale.copy(oldScale); after to restore it.

  • A-Frame Version: 1.6.0
  • Platform / Device: Meta Quest 3
  • Reproducible Code Snippet or URL: /

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions