Search Unity

Object shattering

Discussion in 'General Discussion' started by elzbeb, Dec 15, 2020.

  1. elzbeb

    elzbeb

    Joined:
    Jul 30, 2020
    Posts:
    54
    Hello so I have been trying to make a game like this one


    I wanted to see if someone knows how to make this or the logic behind it, this is my best attempt at making the game https://gyazo.com/abe5826e6fbf1fbc6277cccccf1f99ec
    I want to know how did they make it so when the ball touches the building only that specific part of the building gets destroyed/blown out, I have that in my game but it instantiates the whole broken building and the pieces that the ball hit are affected and it's kinda ugly tbh you can see that the whole building is shattered.
    I am using is kinematic to keep the whole building in place and when the ball touches the building I disable is kinematic for the pieces around the point of impact and it's not really practical, so if anyone knows a solution please tell me
    Thanks
     
  2. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    Maybe have the shattered version from the start but keep everything kinematic and when the ball touches a point it makes everything in a radius around him dynamic.

    maybe make it so that any collision above some threshold makes colliders dynamic, but with how unity does collision testing you're forced to have a monobehaviour on every object afaik, if anyone know of another method to get collisions with out a monobehaviour on every object please share ;)
     
  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569