Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finger drag outside of radius #4

Open
yonimal676 opened this issue Sep 28, 2022 · 0 comments
Open

finger drag outside of radius #4

yonimal676 opened this issue Sep 28, 2022 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@yonimal676
Copy link
Owner

yonimal676 commented Sep 28, 2022

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.

@yonimal676 yonimal676 reopened this Sep 28, 2022
@yonimal676 yonimal676 added documentation Improvements or additions to documentation question Further information is requested and removed documentation Improvements or additions to documentation question Further information is requested labels Sep 28, 2022
@yonimal676 yonimal676 reopened this Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant