Discussions
Error while trying to project a world point to screen coordinates
2 months ago by Boris Babic
I am trying to project the position of my viro object (viro text) into it's screen coordinates:
<ViroText
onClick={_projectPoint} ...
if (
props.arSceneNavigator &&
typeof props.arSceneNavigator.project === 'function' &&
scene.current
) {
props.arSceneNavigator.project([0, 0, -2]).then(
(rectDict: any) => {
console.log(rectDict);
},
(err: any) => {
console.log(err);
},
);
}
The error i see is:
[Error: Argument appears to not be a ReactComponent. Keys: push,pop,popN,jump,replace,startVideoRecording,stopVideoRecording,takeScreenshot,resetARSession,setWorldOrigin,project,unproject,viroAppProps]
Any ideas on what I am doing wrong? Thank you!