GMS 2 Move object with the touch input.

Discussion in 'Programming' started by Montigordev, Oct 12, 2019 at 2:55 PM.

  1. Montigordev

    Montigordev Member

    Joined:
    Oct 11, 2019
    Posts:
    5
    Hi, i want to make object move right by pressing button with the touch input. For example if i want to make it with the keyboard, i simply choose the key down event and write something like player += spd;
    But i did not find the key down analogue for the touch inputs. Tap or dragging simply don't fit. Is there any way i can move object by pressing button with the touch input?
     
  2. Yal

    Yal GMC Memer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,703
    ParodyKnaveBob likes this.
  3. Montigordev

    Montigordev Member

    Joined:
    Oct 11, 2019
    Posts:
    5
    Thank you for the answer, it 50% works. I have two buttons, left and right. Virtual key works on the right button, but does not work on the left. Looks like virtual keys don't work on a flipped object. I used image_xscale = -1. And also i tried to change origin point of the left object and looks like virtual key don't care, it still draws itself on the right side. Maybe it is some kind of a bug idk.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice