Switching virtualjoystickscamera to touchcamera and back

Hello All!
I don’t really know, if this is a bug or a feature…
I am having problems with the gui when switching from a virtualJoysticksCamera to a touchCamera and then back again. In reagrds to the switching, the pure functionality works fine. The only issue I am facing is, that once I switch back from the touchCamera to the virtualJoysticksCamera, the blue controller of the virtualJoysticksCamera in the gui is still in the position where I left it, before i switched to the touchCamera. Plus another controller is put on top of it. So I end up with two virtualJoysticksCamera controller on top of each other. (see picture)

The reason I am switching is, that I would like to enter a code via touch (GUI - virtual keyboard) once the camera collides with a collider. Since the overlay of the virtualJoysticksCamera doesn’t allow any other input, I thought I switch the camera in order to get touch information. If there is a more simple way to do this without leaving the virtualJoysticksCamera I would be more than happy to know about it… :wink:

Thanks for a reply…

Cheers, Kay

The VirtualJoystickCamera adds a utility layer to the scene; that’s what is likely blocking your touch inputs.

Regarding your original intent, if you want to be informed when there’s collisions between two objects you can use the ActionManager to define an onIntersection or similar event handler

1 Like

Thank you for your quick reply. Much appreciated.
I know about the utility layer. That’s why I switch the virtualJoysticksCamera to the touchCamera.
My problem is not the collision, but probably the utility layer, which doesn’t reset, once the virtualJoysticksCamera is detached. It seems that a second instance of the utility layer is put on top of the initial one if I switch back to the virtuslJoysticksCamera.