0
\$\begingroup\$

It keeps falling through the floor.

On the object I added a Rigidbody and it already has a box collider.

Rigid

And the floor:

Floor

I want to make a bouncing ball effect. I'm using the official unity tutorial:

Tutorial

However, my object falls through the floor.

\$\endgroup\$
7
  • \$\begingroup\$ Is the layer "Default" set to collide against itself? \$\endgroup\$ – Leo Feb 27 '18 at 21:49
  • \$\begingroup\$ @Leo I have 7 layers: Default, TransparentFX, Ignnore Raycast, Water, UI, Interactable, -1 and in the tutorial they are changing the layer to Dynamic Objects but I don't have this layer. \$\endgroup\$ – jdoedoe doedoe Feb 27 '18 at 21:59
  • \$\begingroup\$ If you go to Edit->Proyect Settings->Physics, there is a matrix that display which layers should collide against. Is Default/Default combination checked? \$\endgroup\$ – Leo Feb 27 '18 at 22:03
  • 1
    \$\begingroup\$ Found the problem. I had to check enable true the Convex on the floor and using a script to make the NAVI unparent. The NAVI is child. Once he is not a child it's working. \$\endgroup\$ – jdoedoe doedoe Feb 27 '18 at 23:30
  • 2
    \$\begingroup\$ @jdoedoedoedoe you should make an answer out of this comment, and accept it when you can. \$\endgroup\$ – Vaillancourt Feb 28 '18 at 14:07
2
\$\begingroup\$

Check the floor collider. Add a box collider to the floor, remove the mesh collider, and check the result. The floor may have wrong mesh orientation. Or just try turning the floor 180 degrees along the relevant axis.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Or try to set collision detection (Inspector->Rigidbody->Collision detection->Continuous) to continuous if your object move with high speed. \$\endgroup\$ – Bogdan Mar 1 '18 at 11:26
  • \$\begingroup\$ This helped me but maybe I need to set it to continuous dynamic because it freezes sometimes. \$\endgroup\$ – jeffery Jul 25 '20 at 16:21
0
\$\begingroup\$

There can be issue to the layers.

Here you can check out edit->Project settings->physics. See there which layer is colliding and which is not.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.