hiukim / mind-ar-js

Web Augmented Reality. Image Tracking, Face Tracking. Tensorflow.js
MIT License
2.13k stars 394 forks source link

anchor interact with object in world position #435

Closed patacoding closed 5 months ago

patacoding commented 11 months ago

init like this: const { renderer, scene, camera } = mindarThree;

when add object into scene by: scene.add(cube);

how to get/set world position rotation of cube ? seems mindar scene has different coordination from normal threejs scene

thanks!

patacoding commented 11 months ago

set camera position, solve the problem!!

patacoding commented 11 months ago

if I want the anchor interact with other object like detect collide, how to get the world position of the anchor? and , the video steam plane seems to have a position, if it's position.z bigger then a mesh will cover it.

maxrpark commented 11 months ago

Hello, I was going to ask a similar question, but maybe I can join this one. I am also wondering how to get the position of the anchor when using mindar-face-three.

patacoding commented 11 months ago

Hello, I was going to ask a similar question, but maybe I can join this one. I am also wondering how to get the position of the anchor when using mindar-face-three.

I figure out a workaround, append an object to an anchor, then using .getWorldPosition() on the object to get position value.