Search Unity

Debris and Rigidbody

Discussion in 'Scripting' started by BobbyDoogle, Jan 10, 2014.

  1. BobbyDoogle

    BobbyDoogle

    Joined:
    Dec 3, 2013
    Posts:
    17
    I have a simple effect set up where when a bullet hits target it spawns three debris objects (small spheres) that fade out over a few seconds. I have made the small spheres physics objects as I would like them to bounce off things. What I would like however is them not to effect other objects physics (IE when I shoot directly at the ground the objects bounce up and hit the character effecting his/her movement). I have made it closer to what I want by making the mass very small of the small spheres, but there is probably a better (zero effect) way to do this.
     
  2. novashot

    novashot

    Joined:
    Dec 12, 2009
    Posts:
    373
    Put them on a layer that your player collided ignores
     
  3. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    Aye, as novashot said, put them on a separate physics layer, and adjust the properties in the PhysicsManager so the player's layer and the debris layer don't collide.