Issue on 2 touches constraining

WeswogWeswog Member Posts: 1,171
edited November -1 in Working with GS (Mac)
I am having an issue where I am having to touches and two actors constraining only to x axis but if I use touched 2.x it makes the actor move to the side and if I use 1.x for both it messes up so I just need some clarification on what to do

Cheers, Weswog

Comments

  • WeswogWeswog Member Posts: 1,171
    Please help :)

    Cheers, Weswog
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I'm totally at a loss to what you are trying to do. Can you try to describe it with a little more detail.
  • WeswogWeswog Member Posts: 1,171
    Sure, I have 2 actors on 2 sides of the screen I have 2 people touching a device to move those actors but when I constrain it to axis 1.x for both actors it messes up and if I have 1 actor constrained to 2.x and the other 1.x 2 people have to be playing at the same time also if you want me to I will send a version of the game to you. :)

    Cheers, Weswog
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    OK, go it. This really hard to do, but definitely possible. You need to apply the principals found in CodeMonkey's joystick demo. Basically have small touch actors. One that constrains to touch1 another for touch2 etc. Then have rules in the two actors that you are trying to control that say:

    when overlaps with actor touch1
    constrain to touch1x and touch1y

    when overlaps with actor touch2
    constrain to touch2x and touch2y

    put these rules in both actors.
Sign In or Register to comment.