Simply put, every time I apply a Character controller to an object, it falls through the floor. I’m working on some scripts right now and I’m using basic primitives (spheres and cubes) as the characters in the game. Every time I apply the controller to the character, he falls through any object I put below him.
In previous versions of unity, this wasn’t a problem. But now when the Rigid Body and Controller are in place there seems to be no collision. The objects that make up the floor are set as collider, trigger is not checked.
If I also apply a collider (cube or sphere) to the character, it sits fine on the floor, but then the controller can’t seem to recognize commands or states (i.e. grounded).
Any help would be fantastic!
Edit: It may also be important to note that the character controller reacts the same way with or without any scripting on.
Add a rigidbody on the floor plane as well and character will not fall through.
Make sure that in the field under your terrain collider where it asks for “terrain data” that you have selected your terrain (when you click on the little circle, the box will pop up and you can choose your terrain; it defaults as “New Terrain”)
In Unity 3.0 you can’t use character controller and rigidbody with a single gameObject. You need to write your own gravity scripts in order to simulate gravity’s effect.
And don’t use transform.Translate since it skips all collider checks.
You move objects with rigidbody by addForce() function and objects with character controller you move with SimpleMove() or Move(). These translate functions do have collider checks when you use them.
Also remember to check if all the objects have colliders.
Everything worked, until I imported the NewInputSystem’s mobile tutorial assets.
Now, mí character faling throught everything, even if I just put the character controller at an unused Gameobject.
The character is far above the ground, the ground has collider, the physic layers are fine, it’s not a trigger, It’s worked a minute ago.