Git Product home page Git Product logo

godot-softbody2d's Introduction

Godot SoftBody2D

Chat on Discord

A SoftBody2D is defined by a set of RigidBody2Ds and Joint2Ds used to simulate it and a Skeleton2D used to deform the texture.

Installation

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

Features

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

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

Video Tutorial

Tutorial

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.

A vibrant community for discussion, user support and showcases.

License

Godot SoftBody2D is distributed under the MIT license. See LICENSE for more details.

Uses parts of code from (godot-chunked-voronoi-generator)[https://github.com/arcanewright/godot-chunked-voronoi-generator]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.