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

  • Home
  • SEARCH
  • 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 893577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:14:43+00:00 2026-05-15T14:14:43+00:00

As a quick overview: I’m trying to make a game of pool using Box2D

  • 0

As a quick overview: I’m trying to make a game of pool using Box2D as a basis. Now my question:

How should I set up the billiard balls and edges so that they act normally? The balls sometimes seem to stick to the edges for no apparent reason. I’ve got four static wall objects with a restitution of 1 around the edges of the table.

Each ball has the following properties:

friction: 0.3
restitution: 0.3
density: 58.474822 (kg/m^2)
radius: 0.028575 (m)

and the cue ball has a density of 101.356358 (kg/m^2)

When applying an impulse to the cue of 1.2 kg-m/s, the ball seems to move at a normal pool ball speed, and bounces off the walls mostly correctly. However, sometimes when a ball hits a wall it doesn’t bounce off at all, it just stops, or just continues to travel along the wall. This looks weird and seems incorrect. Is there a better way to set this up?

  • 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-15T14:14:43+00:00Added an answer on May 15, 2026 at 2:14 pm

    Box2D is designed to work best with length units between 0.1 and 10 (meters if you will), and the more you step outside this range, the more susceptible it becomes to numerical inaccuracies.

    Try scaling up your system so that the ball has radius 1.0 and scale the rest accordingly. You can keep the material properties as they are but the impulse needs to be upscaled.

    The sticking might also be caused by the body going to sleep when its speed goes below some threshold. You can prevent this by setting allowSleep to false in the b2BodyDef structure. But be aware that bodies that never go to sleep consume a lot more CPU time than bodies that do, so this should be used with care.

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

Sidebar

Related Questions

Quick and should be simple question, but i cant find the answer!!! So im
Quick question. What do you think, I have a few sites that use a
Quick question: Would it be a good or a bad idea to implement my
Quick question: what is the compiler flag to allow g++ to spawn multiple instances
Quick design question. ClassA has a method called DoSomething(args) In DoSomething(), before it can
Quick question. There is a legacy website (that is not under my control and
Quick question regarding CSS and the browser. I tried searching SO and found some
Quick (and hopefully easy) question: I need to trigger a download of a PDF
Quick question, I was curious if there is any difference between a database table
Quick question: How can I access the BN_CLICKED constant and other constants defined for

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.