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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:18:24+00:00 2026-06-04T21:18:24+00:00

I’m using BulletSharp, a C# distribution of the bullet library. I have been getting

  • 0

I’m using BulletSharp, a C# distribution of the bullet library. I have been getting some bouncing in an object that supposedly has Restitution of 0.0f.

I have one dynamic cylinder (what will be a mesh soon) falling to rest on two static cylinders. Like so:

starting object positions

The cylinder on top often bounces around wildly, usually bouncing off to the side.

Here’s the code I’m using to set up the scene:

        //now figure out bulletsharp stuff...
        CollisionConfiguration collConfig = new DefaultCollisionConfiguration();
        Dispatcher collDispatch = new CollisionDispatcher(collConfig);

        BroadphaseInterface broadphase = new DbvtBroadphase();
        ConstraintSolver sol = new SequentialImpulseConstraintSolver();
        world = new DiscreteDynamicsWorld(collDispatch, broadphase, sol, collConfig);

        world.Gravity = new Vector3(0.0f, -10.0f, 0.0f);

        //log (moving object)
        MotionState still = new DefaultMotionState();
        CylinderShape shape = new CylinderShapeZ(0.5f, 1.0f, 1.0f);
        still.WorldTransform = Matrix.Translation(0.0f, 0.4f, 0.0f);
        RigidBodyConstructionInfo constructInfo = new RigidBodyConstructionInfo(1.0f, still, shape);
        logBody = new RigidBody(constructInfo);
        logBody.SetDamping(0.04f, 0.1f);
        world.AddRigidBody(logBody);

        //rollers (static objects)
        CylinderShape r1s = new CylinderShapeZ(0.1f, 1.0f, 1.0f);
        MotionState r1m = new DefaultMotionState();
        r1m.WorldTransform = Matrix.Translation(-0.2f, -0.4f, 0.0f);
        RigidBodyConstructionInfo r1ci = new RigidBodyConstructionInfo(0.0f, r1m, r1s);
        r1 = new RigidBody(r1ci);
        world.AddRigidBody(r1);

        CylinderShape r2s = new CylinderShapeZ(0.1f, 1.0f, 1.0f);
        MotionState r2m = new DefaultMotionState();
        r2m.WorldTransform = Matrix.Translation(0.2f, -0.4f, 0.0f);
        RigidBodyConstructionInfo r2ci = new RigidBodyConstructionInfo(0.0f, r2m, r2s);
        r2 = new RigidBody(r2ci);
        world.AddRigidBody(r2);

And every frame I use world.StepSimulation(0.05f, 100, 0.0005f); to update the physics simulation.

Am I missing any obvious settings? Why is my simulation doing this?

Small update: I have successfully made a similar simulation in Blender’s Bullet stuff. There was no bouncing there… I don’t know what difference there might be between that and this.

  • 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-06-04T21:18:26+00:00Added an answer on June 4, 2026 at 9:18 pm

    You didn’t add Inertia into your model. That should slow down the jittering and should not produce the reverb that ends in it bouncing off the rollers. You’ll need to add it for all three objects including the Zero on the rollers. Try this and let me know how it works:

    //now figure out bulletsharp stuff...
    CollisionConfiguration collConfig = new DefaultCollisionConfiguration();
    Dispatcher collDispatch = new CollisionDispatcher(collConfig);
    
    BroadphaseInterface broadphase = new DbvtBroadphase();
    ConstraintSolver sol = new SequentialImpulseConstraintSolver();
    world = new DiscreteDynamicsWorld(collDispatch, broadphase, sol, collConfig);
    
    world.Gravity = new Vector3(0.0f, -10.0f, 0.0f);
    
    //log (moving object)
    Vector3 cylinderInertia;
    MotionState still = new DefaultMotionState();
    CylinderShape shape = new CylinderShapeZ(0.5f, 1.0f, 1.0f);
    still.WorldTransform = Matrix.Translation(0.0f, 0.4f, 0.0f);
    shape.CalculateLocalInertia(1.0f, out cylinderInertia);    
    RigidBodyConstructionInfo constructInfo = new RigidBodyConstructionInfo(1.0f, still, shape, cylinderInertia);
    logBody = new RigidBody(constructInfo);
    logBody.SetDamping(0.04f, 0.1f);
    world.AddRigidBody(logBody);
    
    //rollers (static objects)
    CylinderShape r1s = new CylinderShapeZ(0.1f, 1.0f, 1.0f);
    MotionState r1m = new DefaultMotionState();
    r1m.WorldTransform = Matrix.Translation(-0.2f, -0.4f, 0.0f);
    RigidBodyConstructionInfo r1ci = new RigidBodyConstructionInfo(0.0f, r1m, r1s, Vector3.Zero);
    r1 = new RigidBody(r1ci);
    world.AddRigidBody(r1);
    
    CylinderShape r2s = new CylinderShapeZ(0.1f, 1.0f, 1.0f);
    MotionState r2m = new DefaultMotionState();
    r2m.WorldTransform = Matrix.Translation(0.2f, -0.4f, 0.0f);
    RigidBodyConstructionInfo r2ci = new RigidBodyConstructionInfo(0.0f, r2m, r2s, Vector3.Zero);
    r2 = new RigidBody(r2ci);
    world.AddRigidBody(r2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I have thousands of HTML files to process using Groovy/Java and I need to
I have some data like this: 1 2 3 4 5 9 2 6
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

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.