Need help in moving an actor the way i want it to move.

I want it to work like this. How do i do it?
ive got an actor in the middle of the screen known as white box. When the user taps the left side of the screen, the white box would move to the left side of the screen. Vice-versa for right. But when the white box is at the left side of the screen and the user taps the right side of the screen, the white box would move to the middle and when the user taps the right side of the screen again, the white box would move to the right side of the screen. vice versa for left.

I've attached some images to help you guys understand it better. Sorry if i seem rather bad at explaining things.




Comments

Sign In or Register to comment.