Tracking touches by actor not by touch number?

charlieaf92charlieaf92 Member Posts: 84
edited November -1 in Working with GS (Mac)
I would like to create a slider control - for example, the player touches the slider and moves their finger back and forth as input. However, the only way that I see to track a touch position is based on touch number. Is there a way to distinguish touches based on the actors that they are within?

Thanks in advance
charlie

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    I don't know if it is what you are after, but I have a volume slider demo on my wall that you are welcome to dig through.
  • charlieaf92charlieaf92 Member Posts: 84
    firemaplegames said:
    I don't know if it is what you are after, but I have a volume slider demo on my wall that you are welcome to dig through.

    Thanks - I'll check it out. Looking back at my post I don't know if I was very clear about my issue. The problem I am facing is that there are other buttons on the screen - so the touch on the slider may or may not be touch 1, it could be touch 3.. I would like an easy way to distinguish the touch on the slider vs. a touch on the other buttons so that I am only tracking the position of the slider touch.

    charlie
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Would the player be interacting with other buttons/touchable elements at the same time? If no, just watching the mouse position and basic touch actions should suffice...no need for touch 1, 2, etc...
  • charlieaf92charlieaf92 Member Posts: 84
    BarkBarkCo said:
    Would the player be interacting with other buttons/touchable elements at the same time? If no, just watching the mouse position and basic touch actions should suffice...no need for touch 1, 2, etc...

    Yes - they may be interacting with the other elements at the same time. The slider is actually going to serve as a steering wheel. In addition to that, there will be gas and brake pedal buttons.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Yeah, if there are other things that need to be interacted with at the same time, I'm pretty sure you need to account for all five (11 on iPad) Touches in every interactive object.

    5 (or 11) duplicates of every Touch Rule.
    Since there is no way of knowing what Touch # is what.

    I may be wrong, but that is how I understand it.
  • charlieaf92charlieaf92 Member Posts: 84
    Thanks for the help. I got it to work by creating 1 container rule that activates with a touch. Then within it a rule for each possible touch that determines if the touch is worth tracking based on its X coordinate relative to the actor.

    charlie
Sign In or Register to comment.