Issue with FirstPersonController joystick lock on multi touch

On Mobile using FirstPersonController Template if we move and swipe to look around the joystick gets stuck and player keep on moving on that direction. Please help us to fix this problem.Thanks

Original Post on Discord

by user 1141289362336784394

Hello :wave: That is most probably caused due to the lack of proper multi touch support in our current event system. We are working on a solution to solve that. I’m sorry about that.

That limit can’t be easily overcome, you have to write your custom solution.

Variant A: is to subscribe to the DOM pointer events yourself, check if the cursor overlaps with the joystick area and then trigger the original logic.
Variant B: create a full HTML based solution.

I’ll bump the priority on the internal task :cactus:

Let me know if you would be unsure how to proceed.

Thanks for bumping up the priority as we are not able to move to production because of this issue. If you can give the full html based solution that will be more helpful. By then please give some quick fix code for variant A.Thanks.

by user 1141289362336784394

I would recommend you just hookup a library like this for your game GitHub - yoannmoinet/nipplejs: 🎮 A virtual joystick for touch capable interfaces.

Could you please help me with the variant A. Please give sample code for this thanks

by user 1141289362336784394

@kipash :cactus: And how can i try FPS single player scene

by user 1141289362336784394

Here are some snippeds showcasing how to subscribe to “HTML” events.
https://engine.needle.tools/docs/scripting-examples.html#receiving-html-element-click-in-component
https://engine.needle.tools/docs/community/contributions/marwie/control-a-timeline-by-scroll/

The docs for pointer events: https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events (that contains MOVE, UP, DOWN)

Pointer is an astraction above MOUSE and TOUCH, which helps you to write your code only once :+1:

First Person Controller - Simple is a single player sample :+1: Is that what you are asking for?
image.png

yes

by user 1141289362336784394

@herbst​:cactus:@kipash :cactus: @marcel :cactus: Please help me on this I am not able to solve this issue as i am new to HTML.

by user 1141289362336784394

Hey, we can provide support but we can’t create your projects for you. If there are specific issues you’re having, feel free to add more information.

Please do not ping team members directly - we are regularly checking in here and providing support. See #:receipt:-rules

Yeah, I understand that you cant create projects for us and sorry for ping you directly. As I had bought pro version shall I PM you directly as you have mentioned in mail.Thanks

by user 1141289362336784394

You can ask here, that’s totally fine. Just don’t ping :slightly_smiling_face:

My specific issue is in your First person controller sample if we move and swipe to look around the joystick gets stuck and player keep on moving on that direction. Please help us to fix this problem.

by user 1141289362336784394

We confirmed the bug above and mentioned that there’s a fix in the pipeline.
Also Marcel pointed out a library that you could use instead and that has a lot of configuration options to cater to your needs.
Did you try that suggestion?

In that solution also there is multi touch issue as in this screenshot.

by user 1141289362336784394

What exactly does that screenshot tell me?

Thanks! for giving this solution :handshake: . But in their demo also if you you touch with one finger and use another finger to swipe the screen as we do for first person character controller the blue points stuck in the screen. Please let us know when you guys have solved the issue we are waiting for this bug to be solved .
Thanks.

by user 1141289362336784394