Check each Object involved (FallingObjects and GroundObjects)
- does Object have a Collider? If not,
select Object
go to the top bar
components
physics
choose appropriate collider
(if Terrain, check the last tab, the little cog-wheel)
Note: mesh-collider may cause problems
Particularly, if both FallingObject and GroundObject have mesh-collider
Particularly, if the mesh is animated
To avoid mesh-collider, you can build an aproximate shape of your mesh from several primitive colliders (in parent-, child- or sibling-GameObjects)
If you need a Mesh-collider no matter what, you can try to place additional primitive colliders where they won’t be in the way to ‘enforce’ the collisions
- is the Object a Trigger? If so,
select Object
find its Collider-Component (if Terrain, check the last tab, the little cog-wheel)
remove the check of ‘IsTrigger’
- is the Collider placed well?
fiddle with center, size and skin-width (start with 0.1) until the green outline aproximately fits the character
(If you get really strange values, it might be due to scale (e.g. your mesh was way too big so you downsized to .01))
- you may try to zero out all positioning (both unity and your modeling-program)
FallingObject and GroundObject have a problem with each-other
- FallingObject-Collider and GroundObject-Collider intersect each other
Move the Object much above the ground (have it fall from some considerable hight for test-purposes)
All of it! Not just the collider or something else that is attached to it (e.g. the Camera of a Character Controller)
Note: a poking-through [“grey capsule”?] may cause Problems even if it’s disabled
[I am not sure what that means myself, I’m sorry… the answer that posted this solution was not very specific =/ ]
Imported Objects (.obj, .fbx, .max etc.):
- Before dragging Object into the Scene (delete if already there)
Look at the hierarchy
find the model
properties
check ‘Generate Colliders’
hit Apply
now drag to the scene
- Are the Normals correct? You may have to
go back to your modeling-programm
hit flip/reverse Normals
Reportedly a single 2-vertex-“triangle” caused bad collider-issues
- Geometry is rather complex? Then you need the Mesh-Collider set to convex
Select Object,
Mesh-Collider-Component
check ‘IsConvex’
FallingObject has a Character-Controller:
- is a Rigidbody applied? If not,
select FallingObject
Top bar
components
physics
rigidbody
- is Gravity applied? If not,
select FallingObject
find its Rigidbody-Component
check ‘Gravity’
Make sure MouseOrbit never has/picks up any parent of the respective object that MouseOrbit is attached to (usually the Camera) as MouseOrbit-target or the resulting ‘dog-chases-tail’-scenario will cause falling.
GroundObject is a Terrain:
-
rumor has it, that Terrain Collider may be screwed up by using the terrain toolkit asset package to make the terrain.
-
collisionmatrix may cause trouble
go to Edit
Project Settings
Physics
collisionmatrix
Scripts
- FallingObject has a script with ‘transform.Translate’ or 'transform.position = ’ or various other ‘funky’ scripting
This may push the Object through the collider ‘against its will’. Try to avoid it. (e.g. use ‘velocity’ or try SimpleMove)
Keep your scene clean
- especially the mac-version seems to be a bit buggy when faced with too much superfluous crap. may somehow disable all colliders.
Debug
- Increase physics calculations per Frame
try and catch collider penetrations (this doesn’t solve the source of the problem)
- drop the Character and a default Cube from high up
If both fall through, investigate the floor’s properties.
If only the character does, investigate the player’s properties.
Note
- falling occures when minimizing or alt-tabbing the editor
This is a known issue; don’t worry about it too much, it’s only in the Editor and won’t happen in the final-built game.
Please Note: I have no competence on the matter what so ever… just gathered what I found. So please point it out if you find any (severe?!) mistakes.
my sources: