• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by bodec · Jan 15, 2012 at 05:46 PM · colliderterraincharactercontroller

walking throu terrain

My character walks throu the terrain, i have a character controller with default settings on, the terrain has the terrain collider on it with material none,trigger off, terrain data none, and tree collider on. any help would be aaprciated.

just to be clear the character walks along the flat hits the hill and walks thou it on the same Z plane

I added a box collider to th object and stopped the falling throu should it have had a collider to begin?

ok more playing with it i now have it running up hills now but its launching like a ramp will AddForce fix that?

not sure what else i can do i have added colliders character components mesh colliders changed sizes i even brought in my own terrain from lightwave i still either fall thou or walk throu the terrain. is it a scripting issue or a problem with my meshes?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by dorpeleg · Jan 18, 2012 at 08:19 PM

click your terrain and look in the inspector make sure the terrain collider is on if its on maybe try choosing some physics material

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image bodec · Jan 19, 2012 at 05:22 AM 0
Share

i found the problem today finnally i hit up the scripts that come with unity and found the velocity code to stop the sinking and floating off. the mesh colider and velocity in the UpdateFunction was the fix

avatar image
1

Answer by Posly · Jan 16, 2012 at 01:58 AM

Try adding a rigidbody maybe that will work. What I think is happening is that the terrain is very thin and when the character moves it might be actually just skipping over the terrain since it's so thin. If you make your character bigger it should make it impossible to skip through the terrain in one frame.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image bodec · Jan 16, 2012 at 02:07 AM 0
Share

i added a cube of the same size larger and smaller and it never fell through, loaded a lamp post i created and it fell throu the box collider is the only thing stopping it from falling through and the only differnce between my items and the game made cube

avatar image dorpeleg · Jan 17, 2012 at 06:20 PM 0
Share

not sure but in the FBXImoprter try checking the box "Generate Colliders" might help

avatar image
0

Answer by bodec · Jan 16, 2012 at 02:29 AM

 I am a bit closer now i now its not the character, i added a ridged body and it fell throu the terrain i placed the character about a meter above the terrain with and with out the ridged body same effect.
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Ship and terrain collision.Need help. 1 Answer

Randomly some prefab instances have Character controller misaligned 0 Answers

Gameobject collision with Terrain C# 4 Answers

Disabling colliders in Terrain Trees? 1 Answer

How to replicate cylindrical collider boundries 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges