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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:08:35+00:00 2026-05-15T23:08:35+00:00

I’m trying to experiment with 2D physics engines in C++. So far, it seems

  • 0

I’m trying to experiment with 2D physics engines in C++. So far, it seems the most popular is Box2D. Unfortunately, Box2D is a rigid body physics engine and that’s not really going to help me with what I want to try.

I want to be able to define a shape which has a number of vertices joined by springs, such that when this shape collides with rigid or other non-rigid shapes its shape will be flexible.

Now I’ve tried to think of ways of doing this in Box2D using only rigid bodies, but there always seems to be flaws:

  1. Use rectangles or line segments for the outer edges of the flexible shape. These will collide with other shapes. Unfortunately, they are not springy, so the desired effect would not be seen.
  2. Each vertex of the shape could be a body with its own small circular shape. These bodies can then be joined together by springs. This would work great in terms of the deformation of the shape, but imagine if the shape landed on a rigid spike and the spike just passed between the vertices. Then the shape would become stuck on the spike.

So what is the best way to do this kind of physics in C++? Preferably without having to write an entire physics engine. Maybe I’m just missing a feature of Box2D. Maybe it’s just not the right choice. Then what is the right choice?

  • 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-15T23:08:35+00:00Added an answer on May 15, 2026 at 11:08 pm

    There are several packages/engines out there that support deformable/soft bodies. If you want something free you can for example check out Phyz, SOFA or Bullet.

    There is a detailed listing on wikipedia. Most of these are 3D-based but you can adapt them to a 2D model by setting up the scene as a plane.

    Happy coding!

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

Sidebar

Related Questions

No related questions found

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.