Clicking on multi GUI Textures on Android at the same time
Hi ,
I'm making a 2D platformer game and I put GUITextures as buttons on screen for input
Here's my script for the Right arrow GUITexture " To move the player to the right "
var holding : boolean = false;
var speed : float = 0;
var speedincrease : float = 1;
function OnMouseDrag () {
holding = true;
speed += speedincrease * Time.deltaTime;
}
function OnMouseUp () {
holding = false;
speed = 0;
}
I attached this script to the GUITexture and it works fine
And this script is for the Jump GUITexture button
var holding : boolean = false;
function OnMouseDown () {
holding = true;
}
function OnMouseUp () {
holding = false;
}
both scripts work fine , but when I click on the jump button while running , the player doesn't jump .. How Can I make the player able to press two buttons at the same time and make them both work ?
Thanks in advance ..
Answer by Fido7783 · Aug 14, 2016 at 09:19 PM
I'm working on doing the same thing. I have a mouse click, finger press on mobile, on the screen and a button that needs to be pressed to fire at the same time.
Your answer

Follow this Question
Related Questions
Two finger tap causes jump bug 0 Answers
SureFire way to stop Multitouch ? 2 Answers
MobileSingleStickControl multi touch doesnt work 1 Answer
Multitouch issues (teleport and fast moves) 1 Answer
Why is my multi touch not working? 1 Answer