- Home /
Question by
TotallyEpicHD · Jan 12, 2014 at 12:49 AM ·
terrain3dfalling
How Do I Stop My Character From Falling Through The Terrain!?
Hello,
I have been at it for over an hour of bad attempts to try to stop my character from falling through the terrain. It is a first person 3D game I am currently working on. Please help!
Comment
Answer by edcarlo · Jan 12, 2014 at 12:57 AM
create collider below the terrain. set that as trigger. then attach a script with OnTriggerEnter:
function OnTriggerEnter(other : Collider)
{
// do some stuff
Destroy(other.gameObject);
}
make sure that trigger is greater than your terrain.