Post marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliessolved.tooltip
I am back with the final solution!
The method above does work if you would like a floating pointer in front of your camera to show direction to an entity in scene, but, it is glitchy and if your hand's shaking slightly the pointer will also shake slightly because of the slight delay of getting the camera position and moving your pointer relative to that position!
The improved method, which work like a charm, is to create a custom placeholder entity that conforms to hasAnchoring, and has no children, no model, just a placeholder. You call the look(at) method on this placeholder entity which won't consume much processing power since it is empty. It will move the object and orients it correctly. Now, you get the orientation of this placeholder entity, apply to your real pointer, which is a child of an AnchorEntity anchored to camera, and set its orientation with respect to world coordinate. Boom! It worked! no more shaking! Don't forget to offset the pointer so it is in front of the camera.
A little bit of code for those came across this post in the future:
pointer.setOrientation(placeHolder.orientation, relativeTo: nil)