You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment BeginTouch creates a touch and set the TouchPhase to Began. This should only for a frame because when the TouchPhase is set to began. When this happen Unity consider that the touch was created in the current frame and will return GetMouseButtonDown(0) true. This will happen every frame even if it supposed to happen just once.
We can fix this by checking the next frame if the touch has changed the phase from Began to Moved or Ended if this happen we don't need to do anything but otherwise we need to set it to Stationary
Steps to reproduce
Create a test that calls BeginTouch()
Check in the game what GetMouseButtonDown(0) return every frame
Actual result
AR
GetMouseButtonDown(0) returns true everytime
Additional info
Expected result
GetMouseButtonDown(0) returns true only once
ER
Additional info
Testability
The text was updated successfully, but these errors were encountered:
At the moment BeginTouch creates a touch and set the TouchPhase to Began. This should only for a frame because when the TouchPhase is set to began. When this happen Unity consider that the touch was created in the current frame and will return GetMouseButtonDown(0) true. This will happen every frame even if it supposed to happen just once.
We can fix this by checking the next frame if the touch has changed the phase from
Began
toMoved
orEnded
if this happen we don't need to do anything but otherwise we need to set it toStationary
Steps to reproduce
Actual result
AR
GetMouseButtonDown(0) returns true everytime
Additional info
Expected result
GetMouseButtonDown(0) returns true only once
ER
Additional info
Testability
The text was updated successfully, but these errors were encountered: