Тёмный

Unity 2D Cloth! No Code Needed! 

ThatOneUnityDev
Подписаться 5 тыс.
Просмотров 14 тыс.
50% 1

Due to popular reddit request, I made a tutorial video on 2D cloth physics. This method requires no code, and looks really great!
Buy me a coffee: ko-fi.com/thatoneunitydev
Link to Kenny's platformer pack:opengameart.org/content/platf...
------------------------
My Setup
PC: amzn.to/499LOMd
Drawing Tablet: amzn.to/3uhegNe
Microphone: amzn.to/4bqWkjX
Keyboard: amzn.to/3SvA2EV
Mouse: amzn.to/3wiriKF
Headset: amzn.to/3whZwxU
Desk: amzn.to/42Cot3w
Chair: amzn.to/489RIfc
Note: These products won't cost any more money than they typically would, but by clicking the link as an Amazon Associate, I earn commission from qualifying purchases.
------------------------
Timestamps
0:00​ Introduction
0:19​ Project Setup
0:30​ Sprites
0:55​ Bones
2:01​ Adding Components
2:46​ Linking The Bones
3:59​ Settings
4:23​ Attaching The Cloth
4:40​ Physics Layers
5:13​ End Result
5:47 Final Thoughts
6:18 Outro
Music:
► Music Credit: 'Low Frequency Music'
Track Name: 'Isolated Aren't We All'
Music By: Low Frequency Music
Official "Low Frequency Music" SoundCloud HERE - / user-551516820​
Official "Low Frequency Music" RU-vid Channel HERE - / lowfrequencym...​
Official "Low Frequency Music" Spotify HERE - open.spotify.com/artist/5BGRZ...
DOWNLOAD @ www.chilloutmedia.com/low-fre...
License for commercial use: Creative Commons Attribution 4.0 Unported "Share Alike" (CC BY-SA 4.0) License.
Full License HERE - creativecommons.org/licenses/...
Music promoted by NCM goo.gl/fh3rEJ​ @
www.LoFi-HipHop.com

Игры

Опубликовано:

 

29 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 37   
@kailenhoward4764
@kailenhoward4764 5 месяцев назад
I edited the skin so there is one vertex per bone and changed the joints to 'Distance joint 2D'. then clicked Max distance only. also switched the attachments to 'Fixed Joint 2D'. tweak the rigid body. it looks a little more organic now . Thanks for making this video learned enough to get where I was going
@ThatOneUnityDev
@ThatOneUnityDev 5 месяцев назад
Glad you liked it! :)
@maykerodrigues8041
@maykerodrigues8041 3 года назад
Nice tutorial. Thanks for sharing this. I would love to see more of your works.
@ThatOneUnityDev
@ThatOneUnityDev 3 года назад
No problem! :) Happy to share!
@blooowl
@blooowl 3 года назад
Thanks for making this! I really thought it'd be too difficult/time consuming but you made it very digestible!
@ThatOneUnityDev
@ThatOneUnityDev 3 года назад
Thank you very much! I'm glad you liked it :)
@Wisdawms
@Wisdawms Год назад
That's what she said I'm sorry
@F.T.L
@F.T.L 3 года назад
Man you really saved my life. You should have a lot of subscribers. Explanation is really good, and i cant find even one thing on internet. Everyone suggests to make it in blender and then export it to Unity. Thanks for this really.
@ThatOneUnityDev
@ThatOneUnityDev 3 года назад
Thanks so much for the kind words! I'm glad it helped! :)
@nikhilvardhantawania4591
@nikhilvardhantawania4591 Год назад
Man you should have a million views or something
@ThatOneUnityDev
@ThatOneUnityDev Год назад
haha thank you :)
@clode469
@clode469 2 года назад
Do you think this would be possible to achieve in godot?
@user-rp5or1ik5l
@user-rp5or1ik5l 2 года назад
Didn't work quite nicely with me, the cloth joints connected to the background, I probably did something wrong but how do i fix it?
@ellucas5442
@ellucas5442 11 месяцев назад
hello, when I try to put the bones it doesn't let me, I don't know why, maybe it's a bug in the latest version
@rishabh999100
@rishabh999100 3 года назад
F"king brilliant
@WilemII
@WilemII 2 года назад
Thanks! Do you know a way to add a random sprite in the cape so it can be deformed? (Not changing the cape sprite at all)
@ThatOneUnityDev
@ThatOneUnityDev 2 года назад
Hmmm, I'm not to sure it's possible without looking odd, unless you repeat the same process as the cape, and try attaching it via spring joint, but even then it might look off.
@StickyLabDev
@StickyLabDev Год назад
kinda good
@virendrabhoriwal426
@virendrabhoriwal426 3 года назад
Really great tutorial ! But how would you achieve resetting these animated object or SpringJoints2D??? animated object to its initial bone positions... ??
@virendrabhoriwal426
@virendrabhoriwal426 3 года назад
If we want to do it during runtime??
@ThatOneUnityDev
@ThatOneUnityDev 3 года назад
I'm not to sure if I'm understanding the question correctly. If you wanted to disable the real-time cloth you could just make arrays for all the joints, one for all rigidbodies, and one with their original positions. In Start() set the original positions, then when your ready to disable it, remove the object in the connected body slots of each joint, make the rigidbody's kinematic, and finally reset their positions. To re-enable it, just do the opposite. Hopefully that helped :)
@virendrabhoriwal426
@virendrabhoriwal426 3 года назад
@@ThatOneUnityDev Thank you for your reply. I will try to code like that..hopefully it should work. Just liked plus subscribed...:)
@ahsanulirham7765
@ahsanulirham7765 2 года назад
How to make that is so smooth like on 5:53 position?..... Please answer this message.....
@ThatOneUnityDev
@ThatOneUnityDev 2 года назад
I literally did everything I showed in the video. :)
@Omnivoid22
@Omnivoid22 Год назад
I know this is old but this should work with hair , right?
@ThatOneUnityDev
@ThatOneUnityDev Год назад
I haven't tried it myself, but I would like to think so! :)
@hosamgalal4688
@hosamgalal4688 2 года назад
Hello, thanks for the toturial but it's not working for me, i followed the video and i have problems , the cape doesn't move with the character unless i attach it to the character, and even tho it fall down like a piece of cloth and don't work the way you show in the video, any idea what's wrong here? Thanks again and hope you will reply to this ....
@ThatOneUnityDev
@ThatOneUnityDev 2 года назад
I think you might have missed the step at 4:23 where I attach the cloth to the player with joints. Hope I helped :)
@hosamgalal4688
@hosamgalal4688 2 года назад
@@ThatOneUnityDev no , I did it really, I attached both bones in the top corners
@bobooso1913
@bobooso1913 3 года назад
It works almost perfectly but my character keeps getting pulled back because of the cape
@ThatOneUnityDev
@ThatOneUnityDev 3 года назад
You can try to adjust the gravity, and mass of the rigidbody2D's that are on the cape, hopefully that helps! :) ... An alternative would be to make a script that limits the velocities so you don't get that pulling effect. In the demo I showed, I had very little mass and gravity scale to avoid that issue. :)
@user-xc6sk4xm6b
@user-xc6sk4xm6b 3 года назад
Don't know why but my bones keeps falling down on movement far away from connected player
@ThatOneUnityDev
@ThatOneUnityDev 3 года назад
Are you sure your bones are setup correctly? Perhaps the force of your movement is to much for the joint to handle, your cloths rigidbodies could be to heavy, or it could be colliding with the player still. Hopefully I helped! :)
@user-xc6sk4xm6b
@user-xc6sk4xm6b 3 года назад
@@ThatOneUnityDev didn't solve it, I tried to implement exactly like you with plain square and I came up with bones not keep up to player. I tuned up in various ways all settings (mass, freq, damping, anchor points and etc.) And best scenario i had is cloth just spinning around player at furious speed 😀. I'll try different bones structure with verlet integration.
@kailenhoward4764
@kailenhoward4764 5 месяцев назад
I know its late but did you select Auto Configure Distance?@@user-xc6sk4xm6b
@YigitEfe_
@YigitEfe_ 2 года назад
Can we do these in pixel sprites? If I continue to made physics by hand frame by frame I’m gonna throw my self from window
@ThatOneUnityDev
@ThatOneUnityDev 2 года назад
Yes, it should work for pixel art lol
Далее
How To Make An Atmospheric 2D Game (Pt1)
8:19
Просмотров 10 тыс.
How To Make A 2D Ik-Driven Spider
11:16
Просмотров 17 тыс.
Making a Background BEAUTIFUL (My full process)
8:01
How to Make a Good 2D Camera
11:38
Просмотров 393 тыс.
Unreal Engine Paper2D (2.5D) - Fetch Quest Test
2:39
Unity Movement [RigidBody vs Translate]
9:00
Просмотров 283 тыс.
Creating Rope Objects with Physics | Unity Tutorial
10:36
Soft Body 2D Tutorial Jelly Effect - Unity (Easy)
4:25
2 Python Developers VS $1000
15:04
Просмотров 1,8 млн
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 697 тыс.