Unity Virtual Stick Does Not Return to Center When You Release Your Finger

Asked 1 years ago, Updated 1 years ago, 452 views

Unity uses On-screen sticks to display two sticks on the screen (move and rotate viewpoints).
I printed it on WebGL and ran it on my smartphone browser.
Basically, it works fine, but if you touch both sticks at the same time and release them at the same time, the stick may not return to the center. (Keep moving)

https://assetstore.unity.com/packages/tools/input-management/joystick-pack-107631
The same thing happens when I use this asset, so I think it's a touch event problem...

Is there any way to deal with it?
I want the stick that released my finger to go back to the center.

The Unity version is 2021.2.17f1
The same thing is happening in Chorome on Android and Safari on iPad.

unity3d webgl

2023-03-09 23:42

1 Answers

I think Unity's WebGL did not support smartphone browsers.I'm sorry if it was recently supported.In that case, I would appreciate it if you could tell me the source of that information.

The following is the source of the "unsupported" information:

Unity User Manual-WebGL compatibility between browsers

Note that Unity WebGL content is not currently supported on mobile devices.

The reason for this behavior is that it is not being tested by Unity Technologies because it is not supported."Just to guess, there is no ""touch"" or ""multi-touch"" function internally, and everything is processed internally with ""mouse button""."If you use the mouse button, you won't be able to press the mouse button at the same time, so it can be strange.

I don't know what to do, but the usual solution is to try to meet the requirements in a supported way.If you want to use a smartphone, you can create a smartphone application, or if it has to be a browser game, you can't use a smartphone.Other options include using a different game engine that supports multi-touch smartphone browsers.


2023-03-10 09:21

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.