Hi I am new to react-native / functional programming and just started using Viro. I have experience using the Unity game engine and manipulating vectors.
I have some ViroText objects that are instantiated upon scanning an ViroARImageMarker, so their positions are local to that marker.
I want to have those Text objects always rotated towards the camera.
I saw that
.getCameraOrientationAsync() is used to get the camera position.
But can I have some suggestions on how to go about doing this?
My current idea for a approach is to…
- Get global position of viro-text object
- Get position of camera
- Manually calculate the rotation of the viro-text object with vector math in relation to the camera’s position
- apply the rotation to the viro-text object
Please help thanks