How to use VirtualJoystickCamera with the rest of the app?

VirtualJoystickCamera opens a global canvas on the <body> element. This is a bit weird, since it pretty much locks the DOM. You can’t get a click on a button to go fullscreen, and if you somehow go fullscreen first, VirtualJoystickCamera will only work if you requested fullscreen on body. You can’t escape it after it’s created – there’s no way to interact with the DOM anymore.

Am I missing something here? Is it perhaps sort of abandoned for a better interaction camera in mobiles?

Hi.

Yeah, that’s a known problem. Maybe you can play with z-index? To be honest I am not if it will work. I worked on a workaround some time ago, using BABYLON GUI. I have a project that requires similar work so I will be redesigning that system (in the next 2-3 days should be done). So if you can wait, I could share that with you. In the meantime you can look into my older system on this thread.

2 Likes

So if you can wait, I could share that with you. In the meantime you can look into my older system on this thread.

That’d be great, I can wait and would be happy to test it or help if you need anything. Thanks :slight_smile:

hey @nogalo, any news about your code?

Sorry man, not yet, I am moving to different country at the moment, so I barely have any time. As soon as I get something i will let you know. Until than, if it is urgent for you, I really recommend to look into the thread I’ve posted above. Pretty much it will be the same thing, I will just refactor some stuff for easier control, and I’ve used some private variables of Babylon engine, which is not recommended to do, so I want to rework the logic to avoid that. But it will work on the same principles.