- Home /
Falling through floor
Hi, Im new to unity and my first person controller keeps falling though the terrain. The terrain has a collider and my fp controller has a collider too. Is trigger is not checked. The colliders arent touching each other. It also falls though cubes. Im using unity 3.1. Any help would be greatly appreciated.
The colliders arent touching each other.
How do you know? only because he's falling through the floor. Try Debug.Log (colliderFlag); on the player.
http://unity3d.com/support/documentation/ScriptReference/CollisionFlags.Below.html
Answer by oliver-jones · Jan 16, 2011 at 10:18 PM
Try moving your character a fair bit off the floor and then hit play -- what sometimes happens is that when you place your character too close into the terrain floor, the colliders will fall through each other.
was i supposed to attach he script to my player because that didnt work. i also put my character well above he terrain and that didnt work either. Please check back.
Answer by straley · Jun 07, 2011 at 09:42 PM
Hi All,
Just in case people are searching for an answer to this, like I was, I had a similar problem. It turns out I set the XYZ of the Main Camera attached to the First Person Controller -- and not the First Person Controller. Make sure that the Main Camera attached to the First Person Controller XYZ is set to 0,0,0 (or something appropriate). Then, set the XYZ of the First Person Controller.
~ Scott
Answer by icesilvermist2 · Aug 08, 2011 at 09:58 PM
Im so excited because I am a n00b but I have fixed this!! I had a model based off of a cylinder. He fell through the floor no matter what! What I did was A. Make a new Empty Object B. Scale it so that it fits inside of your object C. Move it down so that the bottom just barely goes under your object D. Make the new object the Parent of your object by dragging your object onto it E. Apply your movement scripts to the new Empty Object instead of your object ~~ Hope this helps!!
Your answer
Follow this Question
Related Questions
TornadoTwinsWormVideo#2 HELP!!! 3 Answers
Checklist: Object or Character is falling through the floor 12 Answers
Collider component not working on free falling object! 0 Answers
Unity Platformer Problems 1 Answer
2D Edge Collider Thickness? 1 Answer