[R102] how to use AngleAt?

0 favourites
  • 2 posts
  • Hi, I have been detecting swipe left/right/up/down the old manual way.

    I see there is an AngleAt and a "compare touch speed".

    How does one use AngleAt? Its not in the touch objects actions, and its not a valid expression if you say "compare two values" and put in AngleAt.

    What is the parameter for "Compare touch Speed". Is it m/s, km/h, pixels/s or similar? I.e. what should I put in there to detect any kind of swipe, e.g. >0?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You definitely can use this expression in 'compare two values'. What error did you get?

    AngleAt takes a single number parameter which is the index of the touch to get. Touch.AngleAt(0) returns the angle in degrees of the first touch, Touch.AngleAt(1) returns the angle of the second touch, etc.

    The description for the 'speed' parameter says the units is in "absolute pixels per second". It appears at the top of the dialog when you select the parameter. This means pixels per second on the canvas, which basically is saying it doesn't change depending on if you scale the game really large or small.

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