How to Make Softbody Physics in Unity!
Ойын-сауық
Unity 2D soft body tutorial using rigged sprites, rigidbodies and spring joints. Here I demonstrate how you can create a 2d soft body shapes and use it for your awesome projects. Can be used for Jelly simulation, car tyres, liuid blobs, goo you name it!
Download project: drive.google.com/file/d/1RbXJ...
Music: "8 Bit Street" By HeatleyBros
Song link: • "8 Bit Street!" Appel ...
Пікірлер: 176
Im so happy that i found this video. I was almost going to write a code that i learned from another tutorial instead of this simple and great method. Thank you for this tutorial man
This is really inspiring me a lot! Applying same method in 3D works pretty well! Big thanks!
So excited to watch this when I get home from work. Thank you for the tutorial!
@PyroPhysicsGames
3 жыл бұрын
Hope you enjoy it!
@maximoaugustus1768
2 жыл бұрын
sorry to be offtopic but does any of you know a tool to get back into an Instagram account? I stupidly forgot the login password. I would love any help you can give me
For those who use Unity 2020.3.X and have weird physics artifacts: after setting initial position of anchors by marking-unmarking "Auto configure connected anchors", you also need to mark "Auto configure distance" but do not unmark it.
@shaunandrew5719
2 жыл бұрын
Thank you.
@hongphuocly6978
2 жыл бұрын
It’s really helpful. Thanks a lot
@SimerCollotia
5 ай бұрын
Thanks
Great tutorial and great assets! Thank you so much!
This is incredible!! LOVE it!
Gr8 tutorial and superbly explained a difficult conscious in a simple way.. cheers
Thank you so much. Simple, easy, just amazing in general. You earned a new sub. :)
@PyroPhysicsGames
2 жыл бұрын
Thanks!
That's awesome idea!😄Nice! Thanks!
so far the best tutorial nice and clean . keep up the good work thumbs up
@PyroPhysicsGames
3 жыл бұрын
Much appreciated!
This is really cool, great video and tutorial
This is AMAZING! Thank you for sharing with us ;)
@PyroPhysicsGames
3 жыл бұрын
Thank you for watching!
Awsome idea......thanks......looking for this for few days
thank you highfly! i thought i was gonna follow a 10 minute tutorial and that i was gonna have to use mini versions of the sprite and use a uv map instead i got this quick and easy tutorial you got a new sub! edit: why you only have 623 subs >:(
@PyroPhysicsGames
3 жыл бұрын
Your welcome!!!
Awesome, informative, and funny. Hope you get lots o subs!
it looks so much fun
Very helpful man thanks
this is probably computationally more expensive compared to other methods but easier and more fun to develop with
Woahh, cool solution!
this is so good and easy, thx
so good thank u !
Best video on this theme!
@PyroPhysicsGames
3 жыл бұрын
Thank you!!! 🤘
Awesome thanks for this! :D
@PyroPhysicsGames
3 жыл бұрын
No problem!
happy little tutorial :D
Thank you!! Very helpful!!
@PyroPhysicsGames
3 жыл бұрын
Glad it was helpful!
Realy good tutorial. Thank you very much.
@PyroPhysicsGames
3 жыл бұрын
Gald that you like it. Thanks for watching!!
@FLStudioTutorialz
3 жыл бұрын
@@PyroPhysicsGames Hope of future videos. I've learned a lot in this short and nicely on point tutorial.
nice video, good explanation
@PyroPhysicsGames
3 жыл бұрын
Thank you!
Cool!!! Thx Friend!!
Yayy, naujas video!!!!!
Love the soft body physics.
@PyroPhysicsGames
3 жыл бұрын
Thanks! What kind of video would you like to see next??
@tauheedgamedev2388
3 жыл бұрын
@@PyroPhysicsGames I don’t know, probably educational videos like this one
wowie another underrated youtuber!!! there is a lot of them :c
@PyroPhysicsGames
3 жыл бұрын
Everyone have to do the grind to get big 😀
I’m going to try this
Instead of using spring and other things we could make the bones react to the enviroment using raycast, connecting them against each other and then making some simple code to simulate a "spring" but more simple, that would increase the perfomance but what i think would be better it's to somehow create a script to create the bones automatic but i don't have any ideia of how to do this. Amazing tutorial
@PyroPhysicsGames
3 жыл бұрын
Thanks!
Your The best! I was finding this for the last 6 months because i wanted to make a soft body physics like Sam Hogan's Game "Stick with it"!, Thank you i am going to sub!
@PyroPhysicsGames
3 жыл бұрын
Glad to help!!
@B8Code
3 жыл бұрын
@@PyroPhysicsGames Your the best!
@monsieuralexandergulbu3678
3 жыл бұрын
you searched for 6 months and found just this?
@B8Code
3 жыл бұрын
@@monsieuralexandergulbu3678 the others weren't helpful
The video brings to mind the game Gish
Great! I think in this way we can make dynamic 2d water.
@PyroPhysicsGames
3 жыл бұрын
Yeah I tryed! Its deffinitely works😀
that was really good, thanks! For 3D I am guessing we need some sort of dynamic mesh deformation package, and then we can do similar bone approach?
Thanks!!
very good
i will try it on my game
10/10 tysm
Mine still flatten out/splat on the ground like water even with the springs. How do I fix this?
@LongyDev
2 жыл бұрын
Same
@DARK_AMBIGUOUS
2 жыл бұрын
Turn the stiffness up
@Davidpander
Жыл бұрын
@@DARK_AMBIGUOUS how?
Good!!!
That's simple and nicely done. I'd say that the performance is pretty good as well for something that comes almost out of the box. Great idea and solution! Algorithm would be interesting to see, but I already think of a solution that spreads the bones accordingly. Also if we want to be hacky and geeky, we can use a bunch of raycasts and use the bitmask (with shifting the layer index with 1 bit), something like: bool hasCollided = (1
@PyroPhysicsGames
3 жыл бұрын
I like how you think! Raycasting could deffinitely work!.
@bhanusri3732
3 жыл бұрын
Hey does it mean if it collides add spring to the concerned bones and thus the motion is simulated?
Really great tutorial ! But how would you achieve resetting these animated object or SpringJoints2D??? animated object to its initial bone positions... ??
Is there a way i can make this object playable ? i mean moving around whole circle with rigidbody, i cant get it working?
Thank you for this video! One question tho, the body goes crazy and deforms when i pull on it O.O any way to mitigate this?
Hi, how come I assigned neighthor and the opposite bones with spring joint 2d, the joints still move separately?
You got my 100th like :)
@PyroPhysicsGames
3 жыл бұрын
Thanks!
Doesn't seem to work, I've followed every exact step the capsule sprite just comes down as an amalgamation of some sorts, I use unity 2021.2.19f1, do certain versions make different results?
This part made me laugh more than i should have. 3:02
@XZYSquare
3 жыл бұрын
legit turned into a milk simulation
How could you make the game objects rotate around the parent? It is currently the children that are moving so you can't actually rotate the parent without getting some whacky effects
i had an issue with the springs but it got solved by checking auto configure connected anchors
The effect looks amazing! But the download link is expired, can you update it please? I tried to follow the steps with version 2022.3.10f1 but failed to recreate the effect, I would love to take a look at the project to figure our what went wrong.
frik u broke my game
@PyroPhysicsGames
2 жыл бұрын
How? 😄
wow it's so funny idea
How would you do something more like Flubber?
Thanks for the great tutorial. However, I have weird artifacts, because the bones are rotating when colliding. This rotates the sprite part with them, which looks really strange. It's not happening in your case. How did you solve this? :)
@PyroPhysicsGames
2 жыл бұрын
Most likely the problem is that under spring component setting Auto configure connection is at 0. Mark checkbox there to set inicial position and uncheck again. Should work.
@TheExenter
2 жыл бұрын
@@PyroPhysicsGames Thank you. This worked.
Hello, thanks for the tutorial. Would anyone explain me how to get this work in a previously existing project? How to get the Universal render pipeline settings whithout starting a new project? thanks
@PyroPhysicsGames
3 жыл бұрын
There is plenty of tutorals on youtube but basicaly you have to Install URP package. Then create pipline asset and in project settings assign that to graphics settings. Finally upgrade project materials to URP materials if needed.
this helps, but what if I want to make a 2D slime, that moves like a jelly?
the Download project file is not available now can you pls upload that again it would be a great help :) btw great tutorial
@NexusEcho-rs5ho
4 ай бұрын
yes pls for me also it's not working in unity 2021 version
Hello!! Can you public your project? I can't download from Google Drive
I tried this, but after applying the spring components to the bones, the bones and colliders tries to free themselves from the main shape's collider and turn themselves into a pancake. The bones and springs are all properly applied, too. How do I fix this?
@Himans4
Жыл бұрын
see if there is no rigidbody or collider attached to the main shape. Also change the collision detection of each bone to continuous.
SpriteRenderer' does not contain a definition for 'IsUsingDeformableBuffer' and no accessible extension method 'IsUsingDeformableBuffer' accepting a first argument of type 'SpriteRenderer' could be found (are you missing a using directive or an assembly reference?) HOw to get rid of this
I did everything exactly how in this video, but for some reason, bones don't rotate with the object. Instead, they're keeping their direction even when the object rotates
are you using the music from a scratch project called "appel"
That's probably the most expensive method of achieving this
if i want to make it move by controller how?
Could you please do the same with 3D ?
When an object falls onto the stage, it deforms, but the final vibration / oscillation does not fade over time.
@brusshh
2 жыл бұрын
im having the same problem but i figured out that the bones keep rotating and deforming the shape
@noahbender7817
2 жыл бұрын
@@brusshh Hey, I'm having the same problem. How did you fix this?
Hey great video! I'm getting distortion in my mesh because the bones are rotating. Am i missing something or is there a fix to this?
@PyroPhysicsGames
3 жыл бұрын
Most likely the problem is that under spring component setting Auto configure connection is at 0. Mark checkbox there to set inicial position and uncheck again. Should work.
@irishScoutSniper92
3 жыл бұрын
@@PyroPhysicsGames That worked a charm you're a legend! Thanks
it gets a strange distortion when colliding with other objects, any help?
@PyroPhysicsGames
3 жыл бұрын
Your softbody spring anchor points might be set to wrong position. Most common problem
I love your video and this is exactly what I'm looking to implement in my game. Only problem is that I opened the google drive link but it says "Page not found, Sorry the file you are looking for is deleted". Can you re-upload and share the link again please?
@PyroPhysicsGames
5 ай бұрын
Sorry, I don't have access to that directory either. I think its expired. Hopefully tips in the video will be enough.
mine still dont work with the springs
My softbodys are so rigid, how do I make them super squishy (the damping is at 0 and the frequency 1 but still really stiff)
@PyroPhysicsGames
10 ай бұрын
Try increasing rigidbody weight, and other spring paramerers
💯💯💯💯💯💯
Mine doesn't work, some bone is spinning like crazy, did you know why?
this work pretty well , but sometimes the soft body deform a lot if i not enable the" freeze Z rotation", what i can do???
@PyroPhysicsGames
3 жыл бұрын
If your softbody vertex is 3D object then ir might interact with some other 3D objects which have uneven surface (in z axis) that could cause your softbody move in that z axis causing weird deform
@lolcat69
3 жыл бұрын
@@PyroPhysicsGames ok, thx
Damn dude you have such a русский акцент .. (Аж ваще)
@PyroPhysicsGames
3 жыл бұрын
Busted :D
awesome video dude!!, I'm tryin to implement the same in my already existing 2d character controller. The player movement is handled by add force to the parent game obj...but after implementing the bones like u mentioned, I'm not able to move the player...will be glad if u could provide some hint....thanks..
@PyroPhysicsGames
3 жыл бұрын
Since each shape point is rigidbody now you have to add force to each point of the body not only parent
@jinno1236
3 жыл бұрын
@@PyroPhysicsGames thanks for the info...I made a parent bone, and it carries the child bones, where ever it moves...
@PyroPhysicsGames
3 жыл бұрын
@@jinno1236 probbably I would need more info. Need to look at your softbody setup to tell whats wrong
it is a new knowledge for me, and i m thankfull to u for this sharing of info, but i want to make a game in which i use sprite or image and animate it like it's a sticker, like raping and pasting a sticker, i hope u understand it
it is not working nicely on my end
only works in universal render project?
@PyroPhysicsGames
3 жыл бұрын
Didn't tried with other presets
what about for 3D objects ? ???
What can I make when I connect all the bones propertly, and my sofbody still turns into total mess?
@Alex-ir3wr
3 жыл бұрын
i had a similar problem, and i sort of solved it by going under each individual bone's rigidbody, then going under constraints, then freezing the rotation on the z axis. Hope this helps.
@neodymgaming1257
3 жыл бұрын
@@Alex-ir3wr Wait toaday I need to check it out, Soo you think the bones are going like to that three dimention that we can't see from editor perspective cuz we making 2d game?
i wonder if you can automate the bone creating part with scripts? EDIT: also the spring joint part?
@PyroPhysicsGames
Жыл бұрын
Yeah its possible
@Himans4
Жыл бұрын
@@PyroPhysicsGames can you brief a little on how to do it?
Been trying to do it for 4 hours and just realised it doesn't work with the most recent unity versions :(
@Himans4
Жыл бұрын
It works.. in my case i have to enable the Auto Configure Connected Anchor in spring joint 2d
the bones keep twisting and they look like a circular saw blade. What can I do there?
@PyroPhysicsGames
3 жыл бұрын
Problem might be that is that under spring component setting Auto configure connection is at 0. Mark checkbox there to set inicial position and uncheck again.
@mauznemo
3 жыл бұрын
@@PyroPhysicsGames no that doesn't help. The bones spin on themselves and spin like wheels when it rolls across the ground. And that warps the texture. Do you have another idea what it could be?
@PyroPhysicsGames
3 жыл бұрын
@@mauznemo mhhh🤔 I have to look at project itself its hard to say
@mauznemo
3 жыл бұрын
@@PyroPhysicsGames do you have Discord or something that I can send you a screenshot?
@PyroPhysicsGames
3 жыл бұрын
Ignas_hf#8612
Hello I have a noob question. Why am I not seeing the bones when trying to create one?
@PyroPhysicsGames
Жыл бұрын
Maybe gizmos not enabled?
@Himans4
Жыл бұрын
double click to start creating bones... then every left click will form a connecting bone.. and right click to disconnect
Reminds me of Sushi Cat with the circles. Anyone here?
Well im early
@PyroPhysicsGames
3 жыл бұрын
Yeah, just uploaded :D
ive connected the spring joints but it still flops on the ground. is there a fix to this?
@PyroPhysicsGames
2 жыл бұрын
No fix :(
@LongyDev
2 жыл бұрын
@@PyroPhysicsGames is it my version of unity or something like that??
@PyroPhysicsGames
2 жыл бұрын
@@LongyDev unity version for sure
OMG THIS SONG WAS SOUNDING FAMILIAR AND IT IS FROM *THE MOST* POPULAR SCRATCH GAME EDIT: that game was appel
Help mine just deflates
@PyroPhysicsGames
2 жыл бұрын
Same for me :( Back in the days it used to go up every morning now it just stays soft and deflated :( Im trying some pills right now. That ad said it can increase size twice and last up to 8h. I will let you know results 😊 cheers. Like and subscibe!
the say THE im getting way too triggered but please say "the bones of rigidbodies are stiff or they have high stifness " and not "bones rigidbody stiffness " thank you :D
@PyroPhysicsGames
3 жыл бұрын
Okay 😂
that doesn't work on android, just deforming like a hell.
doesn't work
I like fast tutorials but this is to fast
Devlogsssss plzzzzzzzz🥺🥺🥺🥺🥴🥴🥴🥴
@PyroPhysicsGames
3 жыл бұрын
Already making next one!
@GL-Broz
3 жыл бұрын
@@PyroPhysicsGames 😄😄😄
too fastttt