SLIDE + PRESS can't work at the same time :(
I'm working on an action project. I designed the control system as this way: slide up/down to make the role move up or down, press ACTION button to attract an object and then release the ACTION button to shoot the object ( just like the gravity gun in the HALF LIFE 2).
Right now, I have made both of the 2 functions worked separately. But when I want them working at the same time, the slide function can't work. That means when pressing the ACTION button, can't slide.
I've been thinking about the solution for several days. I think it might be the mouse position.
I use an actor to control the slide function:
1.create 2 real attributes in the actor which are touchY releaseY
2.make these rules:
rule NO.1:when touch is press, change the touchY to mouse positionY.
rule NO.2:when touch is release, change the releaseY to mouse positionY.
rule NO.3:when releaseY>touchY, interpolate the ROLE position Y to 500; when releaseY<touchY, interpolate the ROLE position to 100
this slide actor is on the left side of the screen and the ACTION button is on the right side of the screen.
can anyone give me a solution of this problem. thx in advance