olexale / arkit_flutter_plugin

ARKit Flutter Plugin
MIT License
790 stars 223 forks source link

Sphere add physics - falling down to the infinity #204

Open janosdupai opened 1 year ago

janosdupai commented 1 year ago

I want to create a sphere into the AR screen, and with a touch/drag i want to "throw" this spehere.

Is this possible somehow?

I tried with the following code, but the sphere is falling everytime down, and I also can not add any touch recognizer to the node.

 final sphere = ARKitSphere(materials: [image], radius: 0.1);

      ballNode = ARKitNode(
        geometry: sphere,
          physicsBody: ARKitPhysicsBody(
            ARKitPhysicsBodyType.dynamicType,
            categoryBitMask: BodyType.sphere.index + 1,
          ),
        position: vector.Vector3(0, 0.2, 0.3)
      );
janosdupai commented 1 year ago

Is there any information?