olexale / arkit_flutter_plugin

ARKit Flutter Plugin
MIT License
790 stars 223 forks source link

reset anchor with new location in arkitcontrolllr.add(_createBox()) #190

Closed kotran88 closed 1 year ago

kotran88 commented 1 year ago
this.arkitController.add(_createBox());

  ARKitNode _createBox2() => ARKitNode(
        geometry: ARKitBox(
            width: 0.1,
            height: 0.1,
            length: 0.1,
            chamferRadius: 0.01,
            materials: _createRandomColorMaterial()),
        position: vector.Vector3(0, 0, -5),
      );

I create box when app is on box is created in front of me!

it's all okay!

but I want that after spawn first box. then I move to move myself for 5 meter to the right. then I click button to spawn createBox2() then It should be spawn in front of me but it seems spawn in front of 5 meter of my previous location.

How can I reset anchor node ?