Confused touch...
LordTarantor
Member, PRO Posts: 890
Hello everybody:
I am using the joystick, you know the one that interact with the touch actor that you put in the scene. I have other buttons in the scene. The problem is that sometime while I am pressing one of this other buttons (not the joystick) if I press the joystick to move the actor, the actor moves to the direction of the other button I am pressing. And obviously I want the actor to move only when I touch the Joystick and only to the direction pointed by the joystick. Does somebody knows what I am doing wrong, help, please.
I am using the joystick, you know the one that interact with the touch actor that you put in the scene. I have other buttons in the scene. The problem is that sometime while I am pressing one of this other buttons (not the joystick) if I press the joystick to move the actor, the actor moves to the direction of the other button I am pressing. And obviously I want the actor to move only when I touch the Joystick and only to the direction pointed by the joystick. Does somebody knows what I am doing wrong, help, please.
Comments
I ended up making a game.pickIndex (index type)
then rule if actor (joystick) touched: set that variable to 1 or other # in your index
a rule if touch released set to 0
in character actor:
rule if game.pickIndex is 1...do whatever
don't know if that applies to your problem, though...
I noticed that when I am pressing a button (not the joystick) the touch its right there and if I leave the finger on that button no mater where I move the joystick the joystick its going to like snap to that direction and the actor will move to it. This does not happens if I was touching the joystick and the the button. Its only if its the other way around.
Can somebody explain me how to touch properly (lol)...
Who else, please, somebody help me, lets share touches experiences...
You stick should also be constrained to the position of the touch1 actor and not to the normal touch1.x and touch1.y attributes in the devices section.
ok something happened the pressing of the button sis not calling the touch one to their side but the stick stop working.
This is what I did.
I put in the constrain to self.position.x to game.touches.touch1.x<210 ( is that is how I was supposed to doit?)
And then for the second part in the stick in the big constraining rule I add the <210 after every game.touches.touch1.x
is that is how I was supposed to do it, I think not, right?