Drag up and down to move up and down

saad1993saad1993 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

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    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.

  • SocksSocks London, UK.Member Posts: 12,822

    @saad1993 said:
    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.

    It sounds like you have 'mouse X' set in the X position of the Move To behaviour ?

  • saad1993saad1993 Member, BASIC Posts: 47
    edited September 2016

    @Socks said:

    It sounds like you have 'mouse X' set in the X position of the Move To behaviour ?

    I do.
    EDIT: That worked like magic.

  • saad1993saad1993 Member, BASIC Posts: 47

    @jamie_c said:
    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.

    That also worked like magic.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Glad it helped!

Sign In or Register to comment.