Touch doesn't register

mikelowemikelowe Member Posts: 177
edited November -1 in Working with GS (Mac)
The iPad has a screen size of 1024x768. My game can scroll to the side. When I touch at a point greater than 1024 (after scrolling), it doesn't register properly. Why is this?

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You need to create an offset for all of your touch rules. Check out the cookbook videos and search for Offset.
  • mikelowemikelowe Member Posts: 177
    yea I just figured it out. when player.x > 1024, make the spawn point touch.x+1024

    thanks for your reply
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Check out that video. The best thing really is to track the camera origin and the spawn to touch.x+camera.origin.x that way you only need one rule for the whole thing and it will be exactly where you want it every time. As you have it right now if the camera has moved only part of the way over but you player is not past 1024 it will still do screwy things.
  • mikelowemikelowe Member Posts: 177
    i see what you mean. I will look at the video. thanks
  • mikelowemikelowe Member Posts: 177
    it worked!
Sign In or Register to comment.