What determines if the camera is the center of the world, or if the object is at the center of the world? When I do an event: ‘reality.imageupdated’, the detail position is offset off 0,0,0. The when centering a 3dobject to the world origin, it appears at the center of the image target.The camera also does not move, which is different from when interacting with SLAM. But I have two projects using XR8.XrController.configure({ disableWorldTracking: true }) that do not have the same world space (one camera moves, one is stationary).This is some of the source code
XR8.addCameraPipelineModules([
XR8.GlTextureRenderer.pipelineModule(), // Draws the camera feed.
XR8.Threejs.pipelineModule(), // Syncs threejs renderer to camera properties.
XR8.XrController.pipelineModule(),
XRExtras.AlmostThere.pipelineModule(), // Detects unsupported browsers and gives hints.
XRExtras.FullWindowCanvas.pipelineModule(), // Modifies the canvas to fill the window.
XRExtras.Loading.pipelineModule(), // Manages the loading screen on startup.
XRExtras.RuntimeError.pipelineModule(), // Shows an error image on runtime error.
initScenePipelineModule(),
])
XR8.XrController.configure({ disableWorldTracking: true })
XR8.run({
canvas: document.getElementById('camerafeed'),
cameraConfig: {direction: XR8.XrConfig.camera().BACK},
allowedDevices: XR8.XrConfig.device().MOBILE,
})
// Place a cube on the image tracked.
const updateTarget = ({detail}) => {
let q = new THREE.Quaternion(detail.rotation.x, detail.rotation.y, detail.rotation.z, detail.rotation.w )
greenSquare.position.set(detail.position.x, detail.position.y, detail.position.z);
greenSquare.quaternion.slerp(q, 0.75);
}
Testing the threeJS Flyer project from three.js: Image Targets Flyer | 8th Wall | 8th Wall
looks to show that the jellyfish model is positioned at 0,0,0
and it uses the code model.position.copy(detail.position)
