Search Unity

I have a quick question about the rigidBody component.

Discussion in 'Scripting' started by Rick-Gamez, Apr 18, 2015.

  1. Rick-Gamez

    Rick-Gamez

    Joined:
    Mar 23, 2015
    Posts:
    218
    I understand that if you have a gameobject that's designed to move, it's usually a good idea to add a rigidbody component to it. However, if the said gameobject has no colider components would it still need rigidbody?

    thanks.
     
  2. Juice-Tin

    Juice-Tin

    Joined:
    Jul 22, 2012
    Posts:
    244
    Rigidbody is ONLY used for physics, nothing else. If you want your object to act with physics, then it needs a rigidbody and a proper collider.

    However if you're moving your objects manually then don't even bother putting a rigidbody, as it will use up performance for no reason. :)
     
  3. Rick-Gamez

    Rick-Gamez

    Joined:
    Mar 23, 2015
    Posts:
    218
    Yea I thought that was the case. Thanks
     
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    There are exactly two use cases for ridgidbody.

    Collider + Any Movement = rigidbody
    Any physics movement = rigidbody

    Don't use the component otherwise.
     
  5. chelnok

    chelnok

    Joined:
    Jul 2, 2012
    Posts:
    680
    And third use case:
    Need to get collision info = rigidbody (kinematic)
     
    Kiwasi likes this.