Discussions

Ask a Question
Back to All

Error while trying to project a world point to screen coordinates

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!