x


Whenever i run my game, i fall through any terrain i have created

I know that i need to activate a collider of some sort, but i don't know what to do.

more ▼

asked Nov 27 '09 at 10:12 PM

Albetta gravatar image

Albetta
1 1 1 2

Sorry, you'll have to be a little more specific. Does your controller game object have a collider applied?

If it is falling, I can assume it has a rigid body with use gravity set to true. Am I correct in saying so?

Terrain objects have colliders set on them by default, so that is not your problem.

Nov 27 '09 at 10:38 PM equalsequals
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Most of the time you use a CharacterController for puppets (your player, enemies, npc, ...) for other objects that need to interact use Colliders. Add a CharacterController using Component menu. Make sure the Controller is not already through the collider of the terrain (place the char a bit above the terrain!). If still falling through, check if terrain has collider set correct (look in last tab of inspector if Terrain when terrain is selected), the last component should be Terrain Collider. The checkbox isTrigger should be OFF!

If it still doesn't work, create a GameObject -> Create Other -> Cube and place it under your character. If char falls through cube, it's something missing in your character, not the terrain. Select your character and see if there's really a Character Controller component attached, the green capsule you should see on screen when char is selected should match the char size more or less. Twiddle with values, make sure Skin Width isn't too small, start with 0.1 if not sure. Mess with center and size until capsule matches your char, if still falling through, reply and we'll look further :-)

more ▼

answered Nov 28 '09 at 02:08 AM

Jaap Kreijkamp gravatar image

Jaap Kreijkamp
6.4k 20 26 70

(comments are locked)
10|3000 characters needed characters left

Have You checked your character is not through the terrain? maybe that's the problem.

more ▼

answered Oct 31 '12 at 09:30 PM

Ushan gravatar image

Ushan
1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1463

asked: Nov 27 '09 at 10:12 PM

Seen: 8141 times

Last Updated: Oct 31 '12 at 09:30 PM