Skip to content

A 2D Soft Body Physics Engine.

Notifications You must be signed in to change notification settings

shahd-moh-abdel/softBody

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ff32352 · · Aug 29, 2025

History

24 Commits
Aug 29, 2025
Aug 29, 2025
Aug 29, 2025
Aug 25, 2025
Aug 29, 2025
Aug 28, 2025

Repository files navigation

soft Body Physics

A 2D Soft Body Physics Engine, Built with C++ and Raylib.

Screenshot

Installation

Linux:

Make sure the following are installed:

  • raylib
  • A compiler (like gcc)

then run:

bash build.bash

Or download the pre-built version from itch.io here.

Windows:

install

  • raylib
  • A C compiler then compile using your preferred method..

Tech stack

  • Raylib
  • C++

Controls

  • Left Click: Create a soft box at mouse position
  • Right Click: Create a soft blob at mouse position
  • F: Toggle between filled shapes and wireframe view
  • P: Toggle particle and constraint visualization
  • R: Reset to demo scene with obstacles
  • C: Clear all objects
  • SPACE: Toggle particle-to-particle collisions
  • H: Show/hide help

Warning

The collision system works great for normal interactions, but if objects get stuck, they might not escape :) It's designed for external collisions rather than internal recovery

Read More

You Can read more about soft body physics in this paper.

Contributing

Fork it, create your feature branch, commit your changes, push to the branch, create a new pull request.

Athena Award Badge

About

A 2D Soft Body Physics Engine.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published