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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:48:33+00:00 2026-05-26T00:48:33+00:00

What I have is a circle that rolls over other objects and ‘picks’ them

  • 0

What I have is a circle that rolls over other objects and ‘picks’ them up. My current setup uses WeldJoint to join and place the picked up object at the circle’s edge. I then edit these object’s fixtures to become a sensor to avoid collision response. The circle is pushed around using applyForceToCenter() and a slight impulse to get it going. This all works.

The problem is that the the accumulating mass from the new bodies is limiting the main circle’s movement. Too realistic for my game. The bodies keep tugging the circle around. I want to zero out any physics-based attributes affecting the circle.

I’ve tried a variety of methods using resetMassData(), MassData.mass = 0, setAwake(false), setActive(false) …

Any help is appreciated, thanks.

Edit: I’ve thought about using a math function to spiral the object’s around the circle, e.g. Make a sprite go in a circle. I’m not so sure if that’s the route to go with box2d in hand.

  • 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-26T00:48:33+00:00Added an answer on May 26, 2026 at 12:48 am

    When you are using weld joints, you aren’t deleting any of the bodies (which have their own mass) as you attach them to your circle. Since you are content to simply assume that once something becomes stuck to the circle that it no longer needs to collide with anything, a good solution would be to add them as sensors to your circle body. This will require you to delete the body and add the fixture to your circle.

    I think it would be cool to have more objects result in more mass for your circle. Why not make a routine that determines the total additional mass currently stuck on your ball, and scale your ball’s push force accordingly? You’ll end up with the same acceleration but you will get a realistic increase in collision forces generated for free. Not only that, but your welded sensors will also effectively modify the inertia so your ball’s center-of-gravity will now reflect how things are stuck on it! It’s free realism, so I’d try to take advantage of it. Plus it will be easier than writing code to correctly move the fixtures.

    You could also in addition reduce the density of a newly “stuck-on” object by some factor to reduce the effect as necessary.

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

Sidebar

Related Questions

I have the following exercise: Define a class named circle that accepts objects of
I have a ball (a dynamic body in the shape of a circle) that
In Python, say I have some class, Circle, that inherits from Shape. Shape needs
I have a slice of a circle (that is made of moveTo,lineTo,arc,etc) and need
I am trying to start with a circle and have that circle gradually become
i have a program that create the circle that move to random position with
i have a pretty simple rectangluar WinForm that uses timers to check the end
I have a spinning circle UI element that is updated by an NSTimer. I
I have a circle divided into fourths. I need an algorithm that can rotate
I have circle that orbits around the center of my view. It continuously rotates

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.