Skip to content

finger drag outside of radius #4

Open
@yonimal676

Description

@yonimal676

level of difficulty: 3/5

Here is a general representation of the problem:

image

steps:

1. when distance between T and i is bigger than a fixed size -

2. figure out the angle, better yet the radian between T (touched point) and i and the point straight line that crosses the circle horizontally.

3. then find the sizes of the adjacent and opposite sides of the triangle in the circle by finding: cos/sin(radian)max_radius

4. then, depending on which quarter we are talking about, I will either subtract or add , opposite to Yi and adjacent to Xi to get P(x, y) and also keep in mind the width/2f and height/2f so that the coordinates of P are exactly the middle of the ball.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions