disable mouse move input while movement button is pressed

This commit is contained in:
in0finite 2019-07-25 01:13:59 +02:00
parent e6ecbc01e4
commit 64c7e28b63
2 changed files with 7 additions and 3 deletions

View file

@ -144,6 +144,12 @@ namespace SanAndreasUnity.UI
if (movementButton.IsPointerDown && movementButton.IsPointerInside)
{
input = movementButton.GetMovement();
// ignore mouse move input while movement button is pressed
customInput.SetAxis("Mouse X", 0);
customInput.SetAxis("Mouse Y", 0);
customInput.SetAxis("Joystick X", 0);
customInput.SetAxis("Joystick Y", 0);
}
// set input for vertical and horizontal axis
@ -156,8 +162,6 @@ namespace SanAndreasUnity.UI
{
var customInput = CustomInput.Instance;
// Ped ped = Ped.Instance;
// bool pedExists = ped != null;
// get status of jump & fire repeat butons

View file

@ -29,7 +29,7 @@
- Android: add perms for read/write access to storage ; forbid screen rotation ; assign app version ;
- Touch input: vehicle touch input: forward, backward, handbrake, left & right ; weapon switching buttons ; lock cursor when testing finishes ; don't report mouse move input while movement button is being pressed ; remove HUD code from state class ;
- Touch input: vehicle touch input: forward, backward, handbrake, left & right ; weapon switching buttons ; lock cursor when testing finishes ; don't report mouse move input while movement button is being pressed ;
- Play sounds: horn ; empty weapon slot ; ped damage ; footsteps in run and sprint states ;