I’m literally brand new to Unity, and I’m following tutorials, but the character I place just falls through the ground whenever I hit “play”. It makes anything I do pointless as I lose control of the player immediately.
Welcome to the Unity forums, Hewlitt
Be sure that:
- Your character has a collider attached
- The ground has a box collider attached to it
- Your character is stepping up a bit from the ground, meaning you need to place him a bit above the ground.
(just pull him a bit up at the Y-axis)
Such colliders can be applied by selecting the object you want and go to Component → Physics at the top menue.
I hope that helps
i have coliders applied to my terrain (terrain colider) and my character ( i got a box colider applied to it) he is launched from Y 100 and still falls through the terrain, i am a Flash game developer, Fireworks, Photoshop, Maya, Zbrush artist and want to try this program out, but it seems its very complicated right from the start… i am in a trial version trying it out and this program doesn’t make the right impression from the start, lol, i mean since u drop ur character on the terrain the coliders should be applied automaticly really… u should not waste time like this when developing a game, if anyone can find another solution to make a built in character work, which was supposed to work since its dropped on the terrain please do guys :))) i have patience
No reason to resurrect two old thread that says the same thing. The answer given on this thread works for 99% of the people. If it doesn’t work for you that is something else.
To get the best support from the community a screenshot of your setup usually helps. There can be several reasons why your character falls through the ground. For one you can set up layers that makes your character ignore the terrain. Or you can make a script that moves the character using the wrong API calls or even call them incorrectly.
If you want movement that is 100% under your control but still checked by the physics you should use the Rigidbody.MovePosition method called from the FixedUpdate method. The FixedUpdate gets called by Unity just like the Update but at a fixed interval that matches the physics simulation. If you just want to apply speeds in various situations and let the physics system figure it out on its own you can use Rigidbody.AddForce from everywhere. But what you cannot do is touch Transform.Position directly because then the physics system just sees the conflict and tries to resolve it without the knowledge of where you came from. And that often means you fall through the object.
I hope this helps.
NOT WORKING!!?!
Be sure that:
- RigidBody on character “not the same as collider”
- Your character has a collider attached
- The ground has a box collider attached to it
- Your character is stepping up a bit from the ground, meaning you need to place him a bit above the ground.
(just pull him a bit up at the Y-axis)
No reason to reply to an old thread but if anyone new is looking is it Box Collider or Box Collider 2D? Only Box Collider 2D will work.
BoxCollider is a 3D collider. BoxCollider2D is a 2D collider. 3D colliders only work with other 3D colliders. 2D colliders only work with other 2D colliders.
So if you’re making a 2D game with 2D colliders for the environment then you’ll need a 2D collider for your character too.
I keep falling I tried everything
Please don’t necro-post with uselessly vague comments.
When you have an issue, start your own post… it’s FREE!!
How to report your problem productively in the Unity3D forums:
This is the bare minimum of information to report:
- what you want
- what you tried
- what you expected to happen
- what actually happened, log output, variable values, and especially any errors you see
- links to documentation you used to cross-check your work (CRITICAL!!!)
The purpose of YOU providing links is to make our job easier, while simultaneously showing us that you actually put effort into the process. If you haven’t put effort into finding the documentation, why should we bother putting effort into replying?
Do not TALK about code without posting it. Do NOT retype code. Copy/paste and post code properly. ONLY post the relevant code, and then refer to it in your discussion. Do NOT post photographs of code.
If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: https://discussions.unity.com/t/481379