Skip to content

getTouchCircle() Usage

Ferdian edited this page Jan 13, 2021 · 2 revisions

Description

getTouchCircle() Check's if you are touching/holding/not touching inside a circle area

also check getTouch() and getTouchRect() Usage

Values

bool getTouchCircle(
    int x, int y,          // Position of the circle 
    int radius,            // Radius of the circle
    KeyPhase phase         // KeyPhase enum
)

KeyPhase enum contain:
press, held, release

Example

if(getTouchCircle(0, 0, 30, KeyPhase::press)){ //Checks if the 30px radius circle area in the coordinates X:0 Y:0 are touched
    [YOUR CODE HERE]
}

Clone this wiki locally