Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6008657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:51:21+00:00 2026-05-23T01:51:21+00:00

i have a rotated arc drawn using android 2d graphics c.drawArc(new RectF(50, 50, 250,

  • 0

i have a rotated arc drawn using android 2d graphics

c.drawArc(new RectF(50, 50, 250, 250), 30, 270, true, paint);

the arc will rotate while the game is running ,

i wanna know how i can detect if any other game objects(rects ,circles) collide with it ??

this is the first time for me to write a game 🙂

i saw something like this in http://hakim.se/experiments/html5/core/01/

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T01:51:21+00:00Added an answer on May 23, 2026 at 1:51 am

    Arc collisions are slightly harder then normal collisions, but using boolean algebra you can easily check if a given point is inside your arc.

    Take a look at the following picture.

    There are 3 objects here. The black sphere, this visualizes your arc, if something collides with it, it might be inside your arc. The red sphere on top of the black sphere, this visualizes the ‘inside’ of the arc, if something is inside the red sphere, it’s definately not ‘inside’ the arc. Now there is also the green triangle that Visualizes the ‘cut-off’ of your arc, anything inside the green triangle is also definately not in your arc.

    Testing if something is inside the black sphere is easy. (object’s distance to center of sphere <= radius of sphere). Same for the red sphere. The green triangle is a bit tricky, you first have to construct this. Find the start and end radians of your arc. and rotate a unit vector by start radians. Then rotate a unit vector by end radians. Lengthen both these vectors by 2 * the radius of the black sphere. Now use the center point of your arc and the positions of two vectors with added the center position as the 3 points of the triangle. You can then use one of the point-triangle collision solvers: http://www.bing.com/search?q=point+triangle+collision&go=&form=QBLH&scope=web

    So remember: collision with arc = (collision with black sphere) && !(collision with red sphere) && !(collision with green triangle).

    ARC Collision

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple 3D cube that I can rotate using the following code:
How do you rotate an image using jQuery-rotate plugin? I have tried the following
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have Buttons which I have rotated vertically within a Canvas, that is working
I have a UIImageView with an image in it. I have rotated the image
Possible Duplicate: Calculate Bounding box coordinates from a rotated rectangle, Picture inside. I have
If I have a std::vector of objects containing a rotated / translates matrix, is
I have the following logging problem with several Java applications using log4j for logging:
I have a UIWebView which loads a url. In MobileSafari this webpage will adjust

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.