0 Favourites

Touch.X, Touch.Y

  • i am having some trouble converting this:

    mouse -> on button release --> set angle toward (Mouse.X, Mouse.Y)

    into a serviceable mobile touch element

    touch -> on touch end (or any of the touch commands) --> set angle toward (Touch.X, Touch.Y)**

    ** when i run this on my mobile device the sprite would go off to the left at a 45 degree angle (r61) and goes straight up screen (r62) no matter where the touch occurs on the screen

    any suggestions??

  • Hmm, might be a bug - I'll see if I can fix this for the next build.

  • Thanx

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Ashley

    i did a test to see if the values for Touch.X, Touch.Y are at least being registered

    the set up:

    global variable = someTouchedX

    global variable = someTouchedY

    touch -> on touch start --> someTouchedX (Touch.X)

                                someTouchedY (Touch.Y)

                                textX = someTouchedX

                                textY = someTouchedY

    ** the touch values from Touch.X and Touch.Y do register however the values do not translate (immediately)

    what i've noticed is that the Touch.X and Touch.Y do not register until there is a second touch

    (i.e. 1st touch sprite moves in this case upward toward the top of the screen a 2nd touch is entered and the Touch.x and Touch.Y coordinates register and the sprite moves according to -> set angle to (Touch.X, Touch.Y) )

    + not sure if this is a bug in r62 or a matter of "programming"

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)