Start a new topic

Wikitude UnityPlugin - Wikitude Camera and raycast, how does it work?

Wikitude UnityPlugin - Wikitude Camera and raycast, how does it work?

Hi Wikitude Team,

Can you tell me how does the WikitudeCamera object in Unity work, please? And what its childs (WikitudeCanvasCamera and WikitudeSceneCamera) do for the functions for the Augmented Reality? I tried to use a raycasting method for control a character in a Unity scene with the touch on the screen of my phone, but i can't do it and i don't know why.


Hello Fabio,

In order for you to better understand how the WikitudeCamera in Unity works then you could refer to our documentation here and you can also refer to the Unity docs.

I hope these will help but if you still have questions then you can post them here.


Thanks for the documentation but i've already seen it and there's no informations about the specific role of the components of the WikitudeCamera in Unity, what the WikitudeCanvasCamera, the Canvas inside, and the WikitudeSceneCamera do and what the cameras render for the Augmented Reality in the scene. In the documentation there are only the camera controls that i can change directly from the phone, but i want to know if the WikitudeCamera works with the Unity functions that works with the cameras elements in Unity like the Raycast. 



Please make sure that you are using the WikitudeSceneCamera to create the rays with ScreenPointToRay. The MainCamera tag is currently on the WikitudeCanvasCamera, but you can change it to the scene camera if it helps. We will change that in the next update. Also, please note that the up and forward will not work as expected. You can still get a forward vector by getting a ray from the center of the screen.

The setup is that the WikitudeSceneCamera renders the scene into a render texture that is then composited on top of the camera feed by the WikitudeCanvasCamera. We know the setup is a bit hard to work with and we are working on simplifying the whole camera setup and addressing these issues. 

Best regards,

Thank you very much for the informations! I'll try to do it with the WikitudeSceneCamera then, if i have any other problems i'll write here again

Login or Signup to post a comment