This has been answered a gazillion times, but I found that all possible answers are spread across several Questions… So we should have a reference-list of possible reasons.
Greetz, Ky.
This has been answered a gazillion times, but I found that all possible answers are spread across several Questions… So we should have a reference-list of possible reasons.
Greetz, Ky.
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
select Object
find its Collider-Component (if Terrain, check the last tab, the little cog-wheel)
remove the check of ‘IsTrigger’
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))
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 =/ ]
Look at the hierarchy
find the model
properties
check ‘Generate Colliders’
hit Apply
now drag to the scene
go back to your modeling-programm
hit flip/reverse Normals
Reportedly a single 2-vertex-“triangle” caused bad collider-issues
Select Object,
Mesh-Collider-Component
check ‘IsConvex’
select FallingObject
Top bar
components
physics
rigidbody
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.
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
This may push the Object through the collider ‘against its will’. Try to avoid it. (e.g. use ‘velocity’ or try SimpleMove)
try and catch collider penetrations (this doesn’t solve the source of the problem)
If both fall through, investigate the floor’s properties.
If only the character does, investigate the player’s properties.
sometimes good old restart or reimport might just do the trick…
You may want to try Debug.Log(colliderFlag); to check, if it’s really not touching.
Unity - Scripting API: CollisionFlags.Below
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:
After a lot of pain and headaches, I’ve got another addition for the list.
I have a lot of moving and rotating platforms (via iTween) in my project. These were static colliders (they didn’t have a rigid body attached). After lots of research, I’ve found this thread, where it’s recommended to attach a kinematic rigid body to a static collider wich is going to be moved a lot (in order to improve PhysX efficiency). So I attached kinematic rigid bodies to every moving or rotating platforms in my scene.
Worked for me!!!
HIGHLY OVERLOOKED RESOLUTION
Add this to the list
Under the component Rigidbody:
Collision Detection -> Continuous Dynamic
Please note this is more resource intensive, but is much less likely for collision to occur. This is issue commonly missed in answer forums on collision.
As an alternative to using a mesh collider, it is possible to use the much faster sphere collider. Just put many differently sized sphere colliders throughout the mesh area. Here is a complete example of how to do this:
http://isg.cs.tcd.ie/spheretree/
The source code can be downloaded at the bottom of the page. I would recommend fully reading the article first though.
i had this problem once, the problem was that i accidentally put a mask on the Base Layer, making my character to fall through the ground.
I have the same issue only it happens inconsistently.
I have parented objects (quads) in my scene. When i drop a bouncing ball on the parent quad, it collides properly and bounces, but when the ball intersects with on of the children quads, the ball falls through it, even though it has all the identical attributes as the parent. The children quads were all created from duplicating the parent quad.
Also accidentally adjusting Thickness of the terrain in the terrain settings below 1 can cause this.
I found a really weird solution. What I was doing wrong was that instead of moving the whole cardboard asset, I was only moving the main lens. I am new to Unity and it has been just days so I feel really stupid
Lets say you have a game kind of like Dragon Age, with a controlled character and other characters “following” with NavMesh, then you could have problems if your movement script and char animations are not using kinematic.
I had the same problem. I followed the following checklist
My function code was as follows
function OnTriggerEnter (other : Collider)
{
if (other.gameObject.CompareTag("Pick UP"))
{
other.gameObject.SetActive (false);
}
else
{}
}
can I share project and someone can help me understand by my gameobject is going through roof and ground? If so please share email address
why cant i read any of the response here?!