Hi !
I was making a mobile game with my team during a GameJam and now i’m working on. I want polish and fix some things.
During dev, i encounter a problem. The game is a mix with runner and clicker game. When you tap on bot of screen you run faster, when you tap up of the screen you jump.
I’m using new input system. The probleme is simple : When you stay on the touchscreen with at least a finger, contact Input dosn’t seem trigger other. So I want my player can be jump when there is another finger touching the screen. Like this : (the filled dot is input stay)
Here is my Input Handler Script : `
public void TouchPressHandler(InputAction.CallbackContext ctx)
{
if (ctx.started)
{
if (!gameManager.haveControl)
return;
player.OnClick(pos, (float)ctx.startTime);
}
}
Vector2 pos;
public void TouchPosition(InputAction.CallbackContext ctx) => pos = ctx.ReadValue<Vector2>();`
And this is the function on PlayerScript : public void OnClick(Vector2 pos, float startTime) { //Checking ScreenPos if(pos.y < Screen.height / 2) { Accelerate(); } else { OnJump(); } }
And last thing, my inputs :
I don’t understand why, someone ??
Thanks.