Scrolling Left to Right - Unintuitive, please help?
JoeB
Member Posts: 160
I want the player to be able to scroll sideways using their finger. Right now I have a an actor that is constrained to touch X and that actor controls the camera, and it works well enough but the motion is currently unintuitive. Regularly when you swipe your finger to the right in a phone or tablet you'd expect the screen to move left, however in my app it currently moves to the right.
I don't know how to do it so that swiping right actually creates a leftward scrolling motion. Anyone? Please help, thank you.
Comments
I think it has to do something regarding the delta but I do not know how to factor that into my expression
You have an expression you would like us to help you with ?
@Socks Yes, this is based upon a post by @RThurman i read on the forums.
I have an self.offset attribute
When actor is pressed,
Change attribute self.offset to self.Position.X - game.Touches.Touch 1.X
Constrain attribute self.Position.X to game.Touches.Touch 1.X + self.Offset
It works smoothly but the swiping motion goes the wrong way
Give this a try. It controls the camera's origin directly through an unlocked instance actor.
That did the thing! Thanks a lot
You are welcome!