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
tenrdrmerMember, Sous Chef, Senior Sous-ChefPosts: 9,934
You need to create an offset for all of your touch rules. Check out the cookbook videos and search for Offset.
yea I just figured it out. when player.x > 1024, make the spawn point touch.x+1024
thanks for your reply
tenrdrmerMember, Sous Chef, Senior Sous-ChefPosts: 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.
Comments
thanks for your reply