Move camera with touch
jsorr2
Member Posts: 279
I have code set up to move the camera with touch, however it's inverted for some reason. my logic is this:
When touch is pressed in actor as big as scene (1136 x 320)
change attribute -> self.Difference TO game.touches.touch1.X - scene.camera.origin.X
constrain -> scene.camera.origin.x TO game.touches.touch1.x - self.diff
The problem is, the camera moves inverted, but is perfect otherwise. If i swap to self.diff-touch.x the camera moves the way i want it too, however, when touch is pressed again the camera jolts to a new location (if it was at 140, it moves to -140) instead of staying still until touch changes.
Answers
Thanks for that
I clicked on your name to try and find your videos but wasn't able to. Can you tell me where they are located or link to them?
Thanks
Here is a link to @Lost_Oasis_Games youtube channel
Edit: cant get links to work, but search on youtube for Gamesalad Guru
The link in my signature that says guru videos.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS