Some questions about collisions...

Hi everybody!
I am new to Unity and i would like to know some things about collision detection and general optimization!

  1. Are collisions disabled in a character controller?

  2. If i want for example a character that gets damage from enemy bullets, can i put all the code in the character behaviour? I tried doing that, but it only detects collisions with the terrain, and not with the bullets…

  3. Is it better to put all the code in one behaviour (the character detects collisions with the bullets) or to break it in pieces? (the bullets detects collision with the character) ?

Thanks to all of you! :smile:

  1. just make the bullet use sendmessage to call a damage function on the character or whatever it hits (or not call it if there is none)
    then you can make the objects that are meant to get damage have a corresponding damage function and don’t need to check for collisions on this object thats being hit at all for example.

That’s pretty much what i didn’t want to do… I am trying to create a behaviour that automatically knows when to get damage (I.E. from high falls, bullets, etc) by calculating the force of the impact with other objects… Is there a way to do this?