Skip to content

Incorrect Rotation of ARKit Nodes in ARKitPlugin for Flutter #241

Description

@EdgarAldair

When scanning images using ARKitSceneView, the added ARKit nodes rotate unpredictably on the X and Y axes. Sometimes they appear correctly, but other times they rotate by 90°, 10°, etc.
basically the image orientation flips when scanning from different angles when the camera initialize

Steps to Reproduce

  1. Set up ARKitSceneView with image detection group 'AR Resources'.
  2. Add an ARKitNode with specific eulerAngles or orientation.
  3. Observe the node's rotation during and after image detection.

Expected Behavior

ARKit nodes should maintain a consistent and correct orientation without random rotations.

Actual Behavior

Nodes rotate inconsistently:

  • Sometimes by 90° on the X-axis.
  • Other times by 10° on the X-axis.
  • Every time it is different

Code Snippet

final node = ARKitNode(
  scale: vector.Vector3(0.1, 0.1, 0.1),
  geometry: plane,
  position: vector.Vector3(
    earthPosition.x,
    earthPosition.y,
    earthPosition.z,
  ),
   eulerAngles: vector.Vector3.zero(),    // Attempted rotation
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions