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 912013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:18:32+00:00 2026-05-15T17:18:32+00:00

Here is my problem Image I want to check if the balls are touching,

  • 0

Here is my problem
Image

alt text

I want to check if the balls are touching, which works perfect. Sometimes however that ball with the arrow isn’t picked up which of course makes sense since it isn’t touching anything. However, I want to give a little bit of leeway so that if a ball is say 4 pixels/0.001m away, it should be considered as touching. So what idea/ how would i go about implementing it. I looked at the isTouching code and here is what I can come up with.

     var b1 = body1;
var b2 = body2;

 Transform xf;
 Transform xf2;

  b1.GetTransform(out xf);
b2.GetTransform(out xf2);


var touching = AABB.TestOverlap(b1.GetFixtureList().GetShape(), b2.GetFixtureList().GetShape(), ref xf, ref xf2);

 if (!touching)
 continue;

I still need to test if there is a ball faraway, and I am clueless to what I can do.

  • 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-15T17:18:33+00:00Added an answer on May 15, 2026 at 5:18 pm

    Without knowing what all your classes are it’s difficult to give an exact answer. But, the general principal would be to increase the bounds you’re checking against. For example, if your shapes are circles of radius n, when checking collisions you could use a radius of n + 2. Note that you’re still drawing the circle using a radius of n. You just use the increased radius for collision detection.

    Similarly, with the AABB you’d need to increase the bounds by a couple of pixels. How you do that will depend on how your classes work.

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

Sidebar

Related Questions

I've got a problem here with an MSI deployment that I'm working on (using
I'm having a strange problem here... I have an ASP.NET 3.5 application that has
Just a small SVN problem here. I setup my own SVN server Setting up
I'm having a bit of a problem here. We have 2 urls let me
I've got a Schroedinger's Cat type of problem here -- my program (actually the
This is in reference to the question previously asked The problem here is, each
Here's a problem I ran into recently. I have attributes strings of the form
Here's the problem, you include multiple assemblies and add 'using namespaceX' at the top
Here is a problem I've struggled with ever since I first started learning object-oriented
Here's my problem - I'd like to communicate between two websites and I'm looking

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.