Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Debris and Rigidbody

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

  1. BobbyDoogle

    BobbyDoogle

    Joined:
    Dec 3, 2013
    Posts:
    15
    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:
    365
    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.
     
unityunity