Fake Verlet-style physics body implemented using C3's built-in Physics Engine.
I noticed a few forum posts asking about how to implement "jello-like" physics and thought I'd give it a try.

Basically I made a sprite mesh and instantiated "Points" that are connected using a spring joint. Then I mapped the mesh-points to the physical skeleton using some black-magic (math). The end result is a Verlet-like springy-jello effect that can be applied to any Sprite object. 



Notes:

Unlike real Verlet there are no physical "Sticks" attached between the points. This means that objects can still make their way in-between the points and "inside" the sprite if narrow enough. It also makes him pretty prone to "breaking".

Source file is available to look at but beware: I HAD to use a snippet of Javascript since I couldn't figure out how to reference two instances of the same object type and apply a Physics.DistanceJoint between them. 

Anyway have fun and let me know if it helps or you made something cool with it!


UPDATE (4/20/2022) : Added menu where you can adjust some physics settings in real time.

StatusIn development
PlatformsHTML5
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorNateOfThan
GenreSimulation
Made withConstruct
Tagsconstruct-3, example, jello-physics, Physics, sourcecode

Download

Download NowName your own price

Click download now to get access to the following files:

MeshTestWPhysics.c3p 59 kB
MeshTestWPhysicsV2.c3p 67 kB

Comments

Log in with itch.io to leave a comment.


How to make sure that objects don't break?

Sorry still working on it, very slowly lol I work 50+hrs a week atm

Wow, I just really want to use this source code, but I don't need deformation + I would like to be able to work with different shapes, for example with a triangle or a circle. I'm willing to pay

NICE!

Very cool!