Drag up and down to move up and down
saad1993
Member, BASIC Posts: 47
Hello, a little help here.
So I've constrained my player's X position and am making it follow the mouse cursor on screen to move up and down only. However, the problem is that because I'm using the Move To behavior, it moves up and down rather slowly. If my cursor is on the right end of the screen and my player is on the left, and I move the cursor up and down, the player moves up and down at a very slow pace.
I want to be able to move the player up and down eventually by dragging a single touch up and down on screen. or example, if the player is on the left end and I begin my touch drag input on the right, I want the player to follow the UP and DOWN movements at a fast pace.
Thanks for the help in advance!
Comments
Hi, I've attached a demo. I'm not sure it's exactly what you want but it might help. You can touch and drag anywhere on the screen and the actor stays locked at its X location but follows the touch on the Y axis.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
It sounds like you have 'mouse X' set in the X position of the Move To behaviour ?
I do.
EDIT: That worked like magic.
That also worked like magic.
Glad it helped!
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page