Skip to content
프로젝트

소개

Godot SoftBody2D - Plugin that adds deformable 2D soft body.

게임 및 에뮬레이션

이 수치를 측정하는 방법

What you can do

  • Bouncy SoftBody2D
  • Breakable/Deformable SoftBody2D
  • SoftBody2D with Hole

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Documentation | Discord


2D squishy softbodies for the Godot game engine.


Adds the SoftBody2D node which creates a set of RigidBody2Ds and Joint2Ds used with a Skeleton2D in order to deform the texture.

Installation

  • Automatic (Recommended): Download the plugin from the official Godot Asset Store using the Asset Store tab in Godot.
  • Manual: Download the source code and move only the addons folder into your project addons folder.

Requires Godot 4.4 or newer.

Optional: Godot Rapier Physics

Force based breaking (break_mode = FORCE) needs Godot Rapier Physics: install it and select Rapier2D under Project Settings → Physics → 2D. Everything else works on stock Godot Physics.

Video Tutorial

Video Tutorial

Features

You can create multiple types of softbodies with this plugin, such as:

  • Bouncy SoftBody2D
  • Breakable/Deformable SoftBody2D
  • SoftBody2D with Hole

Recent additions (see CHANGELOG.md): shape holding joint_reach, force based breaking, cut(), edge_clearance, bake_scale and debug_draw.

Demos live in demos/ (open demos/demo_hub.tscn) and tests in tests/ (godot --headless res://tests/run_tests.tscn). Run ./lint.sh before committing.

How this plugin creates a softbody

1. Create polygon from texture around edge.
2. Optionally do the same for hole texture.
3. Create multiple regions of same size around polygon.
4. Delete the regions the polygon or inside the hole polygon.
5. Creates a `Skeleton2D` child. Creates a set of `Bone2D` nodes of the `Skeleton2D`, each having a region and assign correct weights to them.
6. Creates a set of `RigidBody2D` nodes, one for each region with a `CollisionShape2D` child, a `RemoteTransform2D` child that targets the coresponding `Bone2D` position, and a set of `Joint2D` children that connect neighbouring rigidbodies. Also for each `Bone2D` node, make it lookat another neighbour node.
7. When the joint length is too big, the joints breaks. Then, the weights for both bones are updated to no longer have weights in the other region.

Star History

관련 프로젝트 살펴보기

불러오는 중…