mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-14 00:07:15 +00:00
disable mouse move input while movement button is pressed
This commit is contained in:
parent
e6ecbc01e4
commit
64c7e28b63
2 changed files with 7 additions and 3 deletions
|
@ -144,6 +144,12 @@ namespace SanAndreasUnity.UI
|
||||||
if (movementButton.IsPointerDown && movementButton.IsPointerInside)
|
if (movementButton.IsPointerDown && movementButton.IsPointerInside)
|
||||||
{
|
{
|
||||||
input = movementButton.GetMovement();
|
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
|
// set input for vertical and horizontal axis
|
||||||
|
@ -156,8 +162,6 @@ namespace SanAndreasUnity.UI
|
||||||
{
|
{
|
||||||
|
|
||||||
var customInput = CustomInput.Instance;
|
var customInput = CustomInput.Instance;
|
||||||
// Ped ped = Ped.Instance;
|
|
||||||
// bool pedExists = ped != null;
|
|
||||||
|
|
||||||
|
|
||||||
// get status of jump & fire repeat butons
|
// get status of jump & fire repeat butons
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
- Android: add perms for read/write access to storage ; forbid screen rotation ; assign app version ;
|
- 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 ;
|
- Play sounds: horn ; empty weapon slot ; ped damage ; footsteps in run and sprint states ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue