The curse of the phantom touch...

LordTarantorLordTarantor Member, PRO Posts: 890
edited November -1 in Working with GS (Mac)
Hello everyone:
I decided to create this post because the last one I did about this topic disappeared even after trying to keep it alive for 3 days.
The problem is the touch. I am using the joystick and some firing buttons. The situation is that if I press one of the firing buttons and then I press the joystick it moves to the direction of the pressed button making the actor to travel to that direction. Its like the touch stays in the position of the pressed button and when trying to move the joystick it just snaps to that direction.
I been 4 days trying to solve this without any luck, please help.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Is this codemonkey's joystick demo? If so, what changes have you made to it?

    Did you copy and paste it into another project? If so, did you check that you re-created all of the attributes that are needed? Did you check all of the otherwise sections?
  • StusAppsStusApps Member, PRO Posts: 1,352
    It is the multitouch. I don't think there is a demo on codemonkeys joystick demo with fire buttons. When people add there own they generally just set them to do something when pressed. The problem is that the joystick will snap to the touch pressed position over the fire buttons if they are pressed first.

    It is a continual problem for people on here, me included. The best solution I found is to isolate the area where the fire buttons are and not allow the touch point actors to move there. The other option is to look at the 2 joystick demo in codemonkeys shared project and see how he achieves the separate pick up/put down rules with each stick and implement these things into a fire button.
  • LordTarantorLordTarantor Member, PRO Posts: 890
    Yes its codemonkey's but I am only using one touch. As soon as you ask me that I went to test codemonkey's proyect in my Iphone and it happened too in the 2 examples for one control. In the other 2 examples it does the thing if you put the other finger outside of the 2nd joystick.
    If you can look at it you will notice tha before you make a move with the joystick if you put a finger any were on the right side and then try to meve the joystick it will snap to that side.
  • LordTarantorLordTarantor Member, PRO Posts: 890
    So stus can you explain me how is that isolation because even the 2 joystick demo does it.
  • StusAppsStusApps Member, PRO Posts: 1,352
    LordTarantor said:
    So stus can you explain me how is that isolation because even the 2 joystick demo does it.

    It's a while since I looked into this project and it took me about 4 days to make it behave how I wanted it to. It is basically that the sticks are looking for collisions with the tiny touch actors. The touch actors should have code in them that checks whether it is touch1, touch2, etc..

    To isolate the fire buttons I made sure that the touch actors could not detect touches in the area of the screen where my fire button is by adding a rule that to be able to constrain position to the finger position then x<240. I seem to recall checking that the stick has no rules that say 'when touch is pressed' it only responds to collisions with the touch points.

    If I had time I would set up a demo project of a single stick and 3 buttons, but have a lot on at the moment. If I get some time in the next couple of weeks I will try because a few people ask this question.
  • LordTarantorLordTarantor Member, PRO Posts: 890
    Stus that demo will be great, I cant deal with this anymore Its been 3 day of breaking my mind and I am exhausted, I just going to move on with something else and when you make that demo Ill come back to it. I also went thru all the demos and all of them does it, so you are my last chance, whenever you get the time to do it I will get back to it.
    Thank you for all the support and most important, thank you for your patience.
  • gazjmgazjm Member Posts: 578
    When I get home tonight I'll have a look at the modifications I made to it. I have it working in my latest game and i can press the fire button or the joypad in any order and it will work fine.

    It was at the start of the project when I changed it so can't quite remember off the top of my head. But I think I may have rewrote the rules for how the actor you controlling responds and when it responds. I think I deleted some of the touch actors too, although im not sure.
  • gazjmgazjm Member Posts: 578
    sorry, just gave it some heavy testing and I have a similar problem, although the way the game is played it won't really occur, luckily!
  • LordTarantorLordTarantor Member, PRO Posts: 890
    Its ok but thanks gazjm for trying.
Sign In or Register to comment.