0 Favourites

[R102] how to use AngleAt?

  • 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!

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
76 9,273
Pandadoor's avatar
Pandadoor
Unread hot topic
0 Favourites
[plugin] 3D using Copperlicht
72 25,982
Reken's avatar
Reken
Unread hot topic
67 9,853
spartacuswell's avatar
spartacuswell