Ideas on how to accomplish this?

TheodiTheodi Member Posts: 96
edited November -1 in Working with GS (Mac)
Hi everyone!

Does anyone know a way to get GS to recognise which side of an actor, or better yet exact points of an actor that are tapped? For example the left and right sides, bottom left, bottom right and from that make the actor act according to the side it was tapped? So if it was tapped on the right side, it bounces off to the left. If theres a video on this that would be great!

Right now i'm using the random attribute which works, but it bounces in weird ways.

Comments

  • PhoticsPhotics Member Posts: 4,172
    If touchX is less than self.position.X
    Then left
    Otherwise right

    If your scene scrolls, you'll have to offset touch data with the camera origin.

    If you're not sure how to work with Scene data and different types of attributes, The Unofficial GameSalad Textbook might be helpful to you.
  • TheodiTheodi Member Posts: 96
    Thanks! Ill take a look.
  • TheodiTheodi Member Posts: 96
    Id like to read that but cant buy it. Your way works anyway, thanks!
Sign In or Register to comment.