Please provide the following information about your environment:
Windows 11
Device OS & Version: Android OS version (8.0.0)
Version: ViroReact 2.23.0 and React Native 0.65
Device(s): Samsung A5 Android 9
Description
When using ViroCamera objects that is out of camera node are not stable on its position that is relative to world coordinates and while moving the mobile (like walking) back and forth (over z axis) the objects keep moving along back and forth and not staying in the real position.
*for example: if object is in position [0,0,-1] and I moved with the mobile to the position [0,0,-2]:
-the desired result: that the object is now out of view
-the actual result: the object keep moving along with the camera and leaving its original position;
note: some other problem that probably relateed -> when using the callback onCameraTransformUpdate on the position property always gives [0,0,0] and never changes.
Reproducible Demo
<ViroARScene
ref={ref => {
this.arSceneRef = ref;
}}
onTrackingUpdated={(_state, reason) => {}}
anchorDetectionTypes={['PlanesHorizontal']}
onCameraTransformUpdate={({position})=>{
//always return [0,0,0]
console.log(position);
}}>
<ViroCamera active={true} position={[0, 0, 0]}>
//this box should be moving with camera and that is working correctly
<ViroBox height={1} length={1} width={1} rotation={[0, 0, 0]} position={[0, 0, -2]} materials={['red']} />
</ViroCamera>
//this box should not move with the camera and stay on position -> (not working as desired)
<ViroBox height={1} length={1} width={1} rotation={[0, 0, 0]} position={[0, -1.5, -3]} materials={['red']} />
</ViroARScene>
Requirements:
Please go through this checklist before opening a new issue
Environment
Please provide the following information about your environment:
Description
When using ViroCamera objects that is out of camera node are not stable on its position that is relative to world coordinates and while moving the mobile (like walking) back and forth (over z axis) the objects keep moving along back and forth and not staying in the real position. *for example: if object is in position [0,0,-1] and I moved with the mobile to the position [0,0,-2]: -the desired result: that the object is now out of view -the actual result: the object keep moving along with the camera and leaving its original position;
note: some other problem that probably relateed -> when using the callback onCameraTransformUpdate on the position property always gives [0,0,0] and never changes.
Reproducible Demo