Search Unity

Lost

Discussion in 'Editor & General Support' started by J-Israelsson, Jul 23, 2006.

  1. J-Israelsson

    J-Israelsson

    Joined:
    Jul 10, 2005
    Posts:
    51
    Hi,

    I've found myself completely lost in Colliders, RigidBodies and CharacterControllers and how they interact with each other.

    What I want to be able to do is as follows:

    I have a player and some enemies. The player is a CharacterController and the enemies is (for now) simple spheres with a sphere collider and a RigidBody attached. Both have IsKinematic enabled. The player should be able to shoot at the enemies (this is working with the shots being simple cubes with a collider and RigidBody, not Is Kinematic) that on collision with the enemies sends to function ApplyDamage on the enemies.

    But there is more that I want and here I am getting lost. I want the enemies to be able to apply damage to the player if the enemies and the player touch. But I can't get this to work in the same way as with the shots. And I also want the other way around the enemies to take some damage from the player if they are in direct contact.

    I would be extremely grateful if someone please could give an overview on how I would solve all this. Which objects should be CharacterControllers, which should be RigidBodies with colliders, which should have IsKinematic enabled av which should not. And which type of collision detection would be appropriate: OnControllerColliderHit, OnControllerControllerHit, OnCollisionEnter. And finally on which object the tests are best put, player or enemy.

    Whiew! Thats quite a lot, but in short what I am after to learn what is best to use in different circumstances. I have looked through both the documentation and the tutorials but i am unfortunately still stuck.

    Regards,

    Johan Israelsson
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
  3. islanddreamer

    islanddreamer

    Joined:
    Apr 29, 2006
    Posts:
    473
    Joachim, I notice you've made quite a few updates to the docs since the release of 1.5 last month. Is there any way to download the updated .html? Is there any chance you guys will release a PDF version soon? (I created one just before the 1.5 release and it was instantly outdated. I'll do it again for the community if I can get the latest docs.)