Search Unity

Why Cubes falls through the floor but Player sphere dose not?

Discussion in 'Getting Started' started by lbvf50, Nov 12, 2017.

  1. lbvf50

    lbvf50

    Joined:
    Nov 12, 2017
    Posts:
    5
    Good day!

    This question about Rall-a-ball tutorial: 3. Collecting, Scoring and Building the game: Collecting the Pick Up Objects.



    Both "Player" and "Pick Up" have "Rigid Body component attached" and have Use Gravity checkbox selected.
    But "Player" sphere dose not falls thought "Ground" mesh, but "Pick Up" cubes dose. And I cannot explain why for myself.

    Thank you
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Do your Pick Up cubes have a collider on them?

    Although the Ridigbody gives it physics properties (such as gravity), you still need a collider to let the engine know what the bounds of the object are.
     
  3. lbvf50

    lbvf50

    Joined:
    Nov 12, 2017
    Posts:
    5
    I do not know yet do they have collider on them. But I know the answer, cubes fall down becuuse they are "is triggered", but sphere is not is triggered. If make sphere "Player" is triggerd it will falls down thought the ground.

    Thank you.
     
  4. lbvf50

    lbvf50

    Joined:
    Nov 12, 2017
    Posts:
    5
  5. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Ah, well yes. "Is Trigger" means the collider no longer acts as a collider, but as a trigger area. Think of it as the difference between a box you can't walk through, and a box-shaped area that when the character enters, a door opens.

    "Is Trigger" should be off on anything you want affected by physics.