SHATTER / DESTRUCTION in Unity (Tutorial)

Поделиться
HTML-код
  • Опубликовано: 1 ноя 2024

Комментарии • 457

  • @klerta
    @klerta 7 лет назад +401

    You are so good at explaining things!

    • @lars-sorensen
      @lars-sorensen 7 лет назад +4

      I agree!

    • @yassindridi
      @yassindridi 7 лет назад +2

      ye he is the best

    • @knoxrobo4174
      @knoxrobo4174 7 лет назад +4

      I also agree and you profile pic is creepy

    • @dylanrickard8694
      @dylanrickard8694 7 лет назад +1

      He is good at explaining but I'm just 10 years old I don't think I can make a game also I don't have a pc to create a game

    • @intrus012
      @intrus012 7 лет назад +4

      If you don't think you can make a game, then you won't make a game. Being 10 years old shouldn't stop you! Practice does make perfect, what you do need is a PC :). Don't give up.

  • @Tbrekke
    @Tbrekke 7 лет назад +269

    You are one of the few unity tutorial people I've seen who actually use editing properly to have some sort of proper pacing in your vids. Good going, man!

    • @dragospop1558
      @dragospop1558 4 года назад +7

      i knooow! i leant soooo much from him!

  • @sanderhoel6289
    @sanderhoel6289 7 лет назад +42

    When you used the same script for the whisky bottle, I couldn't stop feeling satisfied :D

  • @cannonball1174
    @cannonball1174 7 лет назад +27

    Just a recommendation for optimizing performance. You should instantiate the the shattered object on the start and deactivate it. Afterwards you reactivate it when you want the break to happen. Nice vids bro! Keep it up!

    • @afkafkafk
      @afkafkafk 2 года назад +4

      Is this correct?
      public class Destructible : MonoBehaviour
      {
      public GameObject destroyedVersion;
      void Start()
      {
      GameObject tmp = Instantiate(destroyedVersion);
      tmp.SetActive(false);
      destroyedVersion = tmp;
      }
      private void OnCollisionEnter(Collision collision)
      {
      GameObject destroyed = destroyedVersion;
      if (destroyed != null)
      {
      destroyed.transform.position = this.transform.position;
      destroyed.transform.rotation = this.transform.rotation;
      destroyed.SetActive(true);
      }
      Destroy(gameObject);
      }
      }

    • @day_that_i_die9854
      @day_that_i_die9854 Год назад +1

      Indeed! Also if you have a lot of different objects that should be instantiated, you should use Object Pooling. Brakeys has very nice video about it.

    • @kulak8548
      @kulak8548 Год назад +1

      Why would you instantiate it on Start? Just use a prefab that already contains both the destroyed and undestroyed versions.

  • @اشکانمحمدی-ز1ث
    @اشکانمحمدی-ز1ث 4 года назад +6

    OMG!!! I can't believe that you explained all of these things so beautifully just within 5 minutes. Thanks man keep it going

  • @CeretPenyok
    @CeretPenyok 7 лет назад +55

    *BEST---UNITY---LEARNING---CHANNEL!*

  • @peterlavalle
    @peterlavalle 7 лет назад +1

    your skill and style of presentation wows me

  • @kentonleslie-smith7771
    @kentonleslie-smith7771 2 года назад +24

    Make sure that each of the Mesh Colliders on your “destroyed GameObject version” have the “Convex” checkbox ticked in the Unity Inspector, otherwise you’ll be thrown an error that “Non-convex MeshColliders with Non-kinematic Rigid bodies are no longer supported since Unity 5”

    • @sandman9670
      @sandman9670 Год назад +1

      thanks, needs more upvotes

  • @Brumus14
    @Brumus14 4 года назад +55

    0:02 My sleep paralysis demon

  • @123IffoGr
    @123IffoGr 7 лет назад +1

    All these developers and brackeys out here doing hero work. Saved me in hours of need

  • @markyj07
    @markyj07 7 лет назад +5

    Hey Brackeys, love your videos, I don't always use and follow them as in copy exactly what you do as I want to learn from your videos and adapt to my own projects/experiments and you have so many that I end up just watching a lot of random ones and just learning new tips and tricks from all. I was wondering if you haven't already if you could do some videos on trying to understand the physics system a little more such as the mass options and rigidbodies and other relevant information. I heard somewhere that to really get the most out of unity understanding actual physics helps alot. If you have already done some videos, please point them out to me in case I have missed them. Thanks for your videos and helpful guides.

  • @ConorDrew
    @ConorDrew 7 лет назад +148

    Remember if you want to to build a game, or code anything in general, RUclips videos are not a copy and paste thing, in fact, any code of the internet is not.
    What he has done here is shown you the process to do it, in a very simple form, but it helps people understand gameObjects and other coding bits,
    Like to learn a for Loop, we could show you
    for(int i, i

    • @vishalshetty4189
      @vishalshetty4189 5 лет назад

      Hm

    • @noctemcat_
      @noctemcat_ 5 лет назад +5

      @Nagato is better than Punk Naruto You will be surprised how many people didn't get this.

    • @jwalinadhyaru2218
      @jwalinadhyaru2218 4 года назад

      Didn't work 😔 my original object destroys but cracked one doesn't spawn, i can spawn single splint of whole destroyed set of parts though

  • @LUXSUSOFFICIAL
    @LUXSUSOFFICIAL 4 года назад +2

    thank you brotha! - im new to this, currently bought a course on udemy for this, but for 2d, mainly learning scripting now, after I ll buy The 3d version, - and watch all your videos, as you so much more in depth of everything, and showing things they don't do in the course.- someday I WILL BECOME YOUR PATREON TO SUPPORT YOU!

  • @joaocabo07
    @joaocabo07 7 лет назад +39

    Another lovely video. Anybody noticed the way he pronounces Wednesday, so cute.

    • @JACKOFALLFATES
      @JACKOFALLFATES 7 лет назад +1

      haha i was like scrolling down "theres no way someone else noticed that"

    • @joaocabo07
      @joaocabo07 7 лет назад

      ***** Actually I noticed it but I didn't mention it xD. This time I decided I would.

  • @RealNekoGamer
    @RealNekoGamer 4 года назад +2

    I'm guessing something you can also do is, if you want it like in Diablo 3 where swinging your weapon or blasting a spell at an object sends it flying in pieces, after instantiating the fractured object, apply an impulse using data from the attack/projectile before it despawns

  • @SuperRalle123
    @SuperRalle123 7 лет назад +5

    This was great. In my opinion this was a good example of the perfect video. Great work.

  • @theshref5931
    @theshref5931 6 лет назад +160

    Making your own games is easier than you think
    You know..

    • @Gamer-uf1kl
      @Gamer-uf1kl 4 года назад

      ?

    • @arsenije5977
      @arsenije5977 4 года назад +7

      OMG THAT AD SO BORING!!!!

    • @cornflakes6605
      @cornflakes6605 4 года назад

      i hate it so much

    • @artjom5617
      @artjom5617 4 года назад +1

      adblock. but if u preffer wasting hours with ads, dont install it.

    • @2987ms
      @2987ms 4 года назад +2

      @@artjom5617 uBlock Origin is much better

  • @PandeyJiGames
    @PandeyJiGames 7 лет назад +3

    dude......I have been looking for a thing like this for a lot time...you are just awesome

  • @KajitKiller
    @KajitKiller 7 лет назад +78

    Brackeys! Think you could make a tutorial on vehicles? It would provide a long-running series in which you could have multiple vehicles (Car, boat, tank and especially a helicopter). That would be awesome!

    • @prithvishbaidya1119
      @prithvishbaidya1119 6 лет назад +1

      Kajit Killer wow I really want something like that!

    • @ewendaunt4186
      @ewendaunt4186 6 лет назад +1

      Yeah that's be sweeeet

    • @madpancake9891
      @madpancake9891 5 лет назад +3

      Idk of you guys are still Interested but, find some tutorial on it because I'm sure there is one already, make the player object a child of the vehicle object, use the vehicle controlls from some tutorial and that's basically it, you are locked in the vehicle and able to drive it :D To get out use some button and check if you are close enough to car using Physics.checkSphere(object, rangeofcheck, layertolookfor), then give car correct layer so script knows when you are close to car when clicking enter :)

    • @gachastorys5129
      @gachastorys5129 2 года назад

      This comment aged horribly

  • @Steven_Something20
    @Steven_Something20 7 лет назад +2

    I've already said this in a past video but the assets shown here are awesome, thanks again!

  • @pandarzzz
    @pandarzzz 4 года назад +3

    Thank You, Brackey! Tutorial is so helpful... Happy Holidays🎄🦌⛄

  • @Roryscanlan1990
    @Roryscanlan1990 7 лет назад +20

    If any1 is using Maya, to create shattered props go to FX/Effects/Shatter/Solid Shatter.

    • @alexelmoth4643
      @alexelmoth4643 5 лет назад

      Thx

    • @kloa4219
      @kloa4219 5 лет назад +1

      With blender, you can use the cell fracture tool.

  • @dragomirpetrov5600
    @dragomirpetrov5600 4 года назад +1

    Best teacher I've ever had! Thank you!

  • @MrTheamir
    @MrTheamir 6 лет назад

    This is one of the best Unity tutorials on RUclips

  • @thejammydodge1
    @thejammydodge1 4 года назад

    I really just want to know who would dislike these amazing videos!

  • @GameDevNerd
    @GameDevNerd 3 года назад

    A lot of people's videos I take with a grain of salt, because they often show bad practices and poor implementations. But I always pay close attention to what Brackeys has to say about Unity topics. My boy really knows what he's talking about.

  • @OramiIT
    @OramiIT 5 лет назад +4

    Keep in mind you are going to want to texture inside the box as well! This is usually something we ignore for performance issues!

  • @phonebook45
    @phonebook45 6 лет назад +2

    I would love to see a video showing how to program your characters to build/create/paint objects onto the environment.

  • @howdy1234-v5d
    @howdy1234-v5d Год назад

    very useful, used it to make a character turn into a ragdoll on click.

  • @JesusAmaTeMenino
    @JesusAmaTeMenino 7 лет назад +4

    Wow, that timing! I was looking for a good tutorial of this subject this very afternoon \o/

  • @mr.mysteriousyt6118
    @mr.mysteriousyt6118 7 лет назад +168

    how can we do the shatter effect on our own Props ? how can we make a cracked version ?

    • @grocerystore2750
      @grocerystore2750 7 лет назад +56

      you should create a 3d model of your prop cracked in pieces and add physics to each piece

    • @TeamChemicalDestruct
      @TeamChemicalDestruct 7 лет назад +53

      there are many great Blender tutorials for that.

    • @antonbergstrom6740
      @antonbergstrom6740 7 лет назад +41

      I've worked with 3D models before and find that if you want to do something, you have to do it yourself.
      Download a free 3D modeling software (Blender is my suggestion) and make your own cracked version.
      There are alot of tutorials on how blender works, so you'll be running in no time at all

    • @RitobanRoyChowdhury
      @RitobanRoyChowdhury 7 лет назад +14

      Look into the Blender Cell Fracture Addon. I'm sure that other modeling packages have their own equivalents. Andrew Price/BlenderGuru has QuickTips tutorial on this called something Like Destroying things in Blender

    • @WAMBHSE
      @WAMBHSE 7 лет назад +4

      mr.MYSTERIOUS,YT there is a very easy to follow tutorial on how to fracture / shatter any 3D objects which would include your own models. It tells you where to find a free program and how to set everything up in about a 10 minute tutorial. It's titled " [126] Scorpion81 Fracture - How To Make A Game " its by Gamer to game developer and it's part of a series. Check it out. I learned some basic but usefull shattering techniques from it.

  • @D3rFlo
    @D3rFlo 7 лет назад +1

    Short and informative. Great Tutorial

  • @lakeviewgames2975
    @lakeviewgames2975 4 года назад +1

    As always, straight to the point and super useful 😎 thank you, great work 👌

  • @wbrjr820
    @wbrjr820 7 лет назад +2

    Hey there, I just want to thank you for your tutorials! They're helping alot! :)

  • @dami4335
    @dami4335 7 лет назад +3

    Wow i was thinking about something similar minutes ago!

  • @impheris
    @impheris 2 года назад

    i miss this guy

  • @MrSwedencrafter
    @MrSwedencrafter 7 лет назад +2

    Very simple, but still incredibly effective! Thanks for this :)

  • @Kombi-1
    @Kombi-1 7 лет назад

    Ah. A new video.

  • @TheNefari
    @TheNefari 7 лет назад +46

    Wooden Crate Cracked Prefab
    Wooden Crate Cracked Prefab
    Wooden Crate Cracked Prefab
    :D

  • @gorkemvids4839
    @gorkemvids4839 6 лет назад

    Free way to do this is using joints to make an object. And limit joint's breaking force. This way when enough force applied, joints will break and you can make this look like real breaking

  • @nautisshadrick9254
    @nautisshadrick9254 7 лет назад

    Brackeys is the BEST!!!!

  • @illustrukarma
    @illustrukarma 4 года назад

    i love you brackeys you helped so much

  • @ProfessionalJason
    @ProfessionalJason 7 лет назад +5

    The bottles seem to pop because when the broken pieces are placed on the screen, their rigid bodies are actually overlapping and when the physics engine resolves that overlap, they gain a little velocity. The effect is accidental, but it kind of helps in this case.

    • @somare2364
      @somare2364 3 года назад +3

      I was breaking my head to understand why this is happening, thanks for explaining.

  • @samuelbunko3948
    @samuelbunko3948 7 лет назад

    The first few lines you said "In this video we are going to look at destroying things in unity" so i responded in my head and said "Yeah, by using unity's standard asset fireworks in your scene" haha

  • @bojken5384
    @bojken5384 7 лет назад +2

    Nice Tutorial
    As Always

  • @marcosvolpato8135
    @marcosvolpato8135 6 лет назад

    You are the best!! Happy New year with a lot of Successful Projects!!

  • @fathermouse6200
    @fathermouse6200 4 года назад

    I wish you where my professor cause you make things so simple

  • @belfyr
    @belfyr 7 лет назад

    That is fairly well how I figured that would go. The tutorial was great, though. And I learned about the OnMouseDown function

  • @jprice_
    @jprice_ 7 лет назад

    That's way easier than I thought!

  • @ricardojaviergarnicapena6749
    @ricardojaviergarnicapena6749 3 года назад

    Amazing!!! I guess this script can be used to simulate a destroyed house by a rockfall...thank you

  • @wilhelmvonc
    @wilhelmvonc 7 лет назад

    Dude, you are a great tutor.

  • @pnvgordinho
    @pnvgordinho 7 лет назад +6

    You speak so fast that Im getting suspicious when on your longer videos, you say that you are drinking water. :)

  • @drowsy5384
    @drowsy5384 7 лет назад +1

    thanks for your tutorials. Keep doing that mini universal tutorials they're way better than long long series

  • @unforgiven52454
    @unforgiven52454 7 лет назад +1

    Holy crap this was very useful. THank you so much!

  • @amilismurfs
    @amilismurfs 7 лет назад

    you re makeing really good tutorials 👍

  • @TheYusuf10
    @TheYusuf10 7 лет назад

    thank u so much to this whole tutorials dude!

  • @clip0clip092
    @clip0clip092 7 лет назад

    You're an awesome RUclipsr!

  • @SupunWiratunga
    @SupunWiratunga 7 лет назад

    Your videos are awesome brothers! 😊

  • @yazidfahhama5062
    @yazidfahhama5062 7 лет назад

    you're a genius

  • @eijstech
    @eijstech 5 лет назад

    AWESOME TUT!

  • @r3n470f3rn4nd35
    @r3n470f3rn4nd35 6 лет назад

    awesome as usual. congrats

  • @closingdealz
    @closingdealz 7 лет назад

    Great tutorial

  • @aboulkacemhouimel746
    @aboulkacemhouimel746 7 лет назад

    that's an other amazing video done by you Brackeys !!! thnx a lot !!!😉😉

  • @balikif
    @balikif 7 лет назад

    nice tutorial man keep the awesome work!!!

  • @brigosx
    @brigosx 7 лет назад

    Awesome as always. Thanks mate.

  • @ScientObject40
    @ScientObject40 6 лет назад

    well, I'm happy to see ya, and your everlasting smile.

  • @abhisheksuper20
    @abhisheksuper20 6 лет назад

    You are like the flash of programming 😂😂

  • @MerthanE
    @MerthanE 7 лет назад

    Great Tutorial.

  • @vepix4991
    @vepix4991 7 лет назад +6

    I'm your 6 th view and this is helpful cus I am At the moment making a game and I need this!

  • @pnvgordinho
    @pnvgordinho 7 лет назад

    Thanks for the video.
    Great as always.

  • @lars-sorensen
    @lars-sorensen 7 лет назад

    Fantastic! Thank you so much for these videos!

  • @still_adrian
    @still_adrian 7 лет назад

    You are awesome! Greetings from Germany!

  • @FalcFalcFalcFalc
    @FalcFalcFalcFalc 6 лет назад

    Wow that's easier than it seems

  • @wheel9726
    @wheel9726 7 лет назад

    this is the best!

  • @castlecodersltd
    @castlecodersltd 2 года назад

    Great video, thanks

  • @in5pector688
    @in5pector688 7 лет назад

    Nice video! Thanks!

  • @acbytes
    @acbytes 6 лет назад

    You’re special.

  • @vmartme
    @vmartme 7 лет назад

    Thank you so much for all tuts! You are the best :)

  • @MrUndecisive
    @MrUndecisive 7 лет назад

    This site is amazing! Thank you so much!

  • @DevRightms
    @DevRightms 6 лет назад +3

    That look though ;) - 0:02

  • @Baptidu71
    @Baptidu71 7 лет назад +2

    Nice video as always ;) I was wondering could you make videos explaining how you make nice assets like this, I saw that you re using blender, however I find it hard to use and you might be using some other softwares ;) It would really help me with my future projects. thx

  • @user-qw7hb4du6z
    @user-qw7hb4du6z 7 лет назад

    Performance Intensive and Quite Expensive!

  • @Blejo
    @Blejo 7 лет назад

    Thanks man you are awesome

  • @DiegoOliveiraProf
    @DiegoOliveiraProf 7 лет назад

    nice, loved it!

  • @ParagPonkshe
    @ParagPonkshe 7 лет назад

    Thanks alot for superb n simple tutorial.

  • @sebastiandeerhead4564
    @sebastiandeerhead4564 7 лет назад

    YOU ARE AWESOME!!!

  • @Mati22011995
    @Mati22011995 7 лет назад

    Great! I love your tutorials :) cheers

  • @HDNShare
    @HDNShare 6 лет назад

    Thanks for sharing. I appreciate it.

  • @aswinawien2454
    @aswinawien2454 7 лет назад

    simple and cool

  • @kaylabethanderson8748
    @kaylabethanderson8748 6 лет назад +1

    Hello & thanks for this! I'm using this in my unity project, but for some reason the replacement /destructible object sometimes shows up at a smaller scale (it mostly does this but sometimes it doesn't, and sometimes it falls in different ways). Any thoughts on what might be going wrong?

  • @anthonystanley1830
    @anthonystanley1830 7 лет назад +24

    0:02 You're welcome.

  • @FerdieSwinkels
    @FerdieSwinkels 6 лет назад

    This is amazing, thank you!!

  • @mathew3267
    @mathew3267 3 года назад

    This is the way to do things. Find a tutorial and program it yourself. I bought some of those destruction assets on the unity store but ran into problems because they get outdated then the developer never responds to your emails when they don't work.

  • @sy-hungdoan4859
    @sy-hungdoan4859 7 лет назад

    So amazing :)) I really love this video

  • @ObsequiousV4
    @ObsequiousV4 7 лет назад

    Thanks a lot for the tutorial!

  • @kraftwerk28
    @kraftwerk28 7 лет назад

    Where you've got this pretty good color scheme in Visual Studio?

  • @pratikkuratkar4802
    @pratikkuratkar4802 Год назад

    man I tried my own Asset and man that satisfaction when it breaks..🤣

  • @msgaramycin5330
    @msgaramycin5330 7 лет назад

    awesome thanks danish

  • @commenturthegreat2915
    @commenturthegreat2915 5 лет назад +1

    Thanks! This helped a lot! But is there a way to maintain the speed of the object after it breaks?

    • @HAWXLEADER
      @HAWXLEADER 4 года назад

      Yes just add the same velocity form the main to the parts after you destroy the main one.

  • @JackAllpikeMusic
    @JackAllpikeMusic 7 лет назад

    Hey Brackeys, it'd be awesome if you replied. I was wondering how you would make a cube, that you fractured to only demolish when that area is hit, so like a cube of "stone" getting something thrown at it, and that corner or face crumbling with rubble. So far in blender I've made a cube that fractures, but when something hits it I don't want it to COMPLETELY crumble.