Hello,
I’m creating a little game where one can walk around on a platform. I’ve built it using a camera with orbit controls + arrow keys to walk the player object. The orbit controls are fixed to the player object.
On mobile I added a virtual joystick to do the walking. Everything works fine, except that I cannot use the joystick and rotate the orbit controls at the same time. The event listener on the joystick is limited to the dom element only, so i am able to trigger both events separately. But when I am tap-holding the joystick, I can’t look around with the orbit controls. They seem to be blocked by the first tap-hold on another element. Can someone give me a hint on how to get some kind of multitouch functionality for the orbit controls? (panning, zooming, … is all deactivated).
What does your code look like? It all depends which DOM elements you set your event listeners to, and also, which one of the TouchEvent.touches object you’re looking at. You might need to differentiate between event.touches[0] and event.touches[1] if the Joystick is being used… or it could be something else entirely. We’d need to see your code.
@marquizzo@espace3d
Here’s an example of my “physics”: https://codepen.io/Vin-ni/full/gOWxEqM
Actually, in this demo, the multitouch more or less works. So maybe it’s some other event listener in my code, that prevents the dual interaction: steering and looking.
I still have another bug that is happing with that code: Sometimes, the perspective is glitching. Maybe someone has an idea on how to fix that or what is causing it?
Here a sample video: