Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 TopsyKretts · Jan 20, 2012 at 11:50 PM · collisionterrainmeshcolliderterraincollider

Car falls through terrain

Hi Im having a collider problem... for testing i had all the objects in my scene arranged on a cube. Now I wanted to add Terrain, so I deleted the cube and moved everything onto the terrain. Worked fine, except for one thing. My car fell through the terrain. Its colliders are generated during Importing. I read, that I had to use a primitive collider if I had a rigidbody on the object, but it worked well while it was placed on the cube, so why shouldnt it on the terrain? Well, I hope someone can help the newbie I am. Cheers

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

2 Replies

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

Answer by Lo0NuhtiK · Jan 21, 2012 at 12:39 AM

Your car probably has a mesh collider. Mesh against mesh, or mesh against terrain 'ghost' through eachother every time I've ever tried it. If your car has wheel colliders, then those should keep you above ground, but then when you flip your car over somehow on a jump or whatever, the top part of it will ghost through while leaving the wheels on the ground above.
If your car has a mesh collider, that's fine. Add some wheel collider's to it if you're planning on making it control the 'right' way with torque etc .
Then make some child empty gameobjects for the car too. Give each one of them a primitive collider of some sort and position/size them at places like the front bumper, rear bumper, roof of the car ;... places like that. Then, when/if your car flips over those primitive colliders will keep it from ghosting through the terrain, but you'll still also have your mesh collider to use for other stuff e.g. you want to shoot your car and put bullet hole decals on it in the right spot rather than floating out away from the mesh on a box collider.

Then, another way, if you don't want to go through doing all that other stuff.
You could simply mark your cars mesh collider as 'convex' in the inspector. This makes the collider something like a primitive and shapes it around your meshes outermost vertices in a way ; and it should keep you on the surface.

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 alexpop94 · Jul 16, 2019 at 10:01 AM 0
Share

thank you !

avatar image
0

Answer by TopsyKretts · Jan 21, 2012 at 04:34 PM

Thank you very much. Now my only Problem is the mesh collider. I imported my Model from a 3ds file. Its made from several meshes and grouped in a prefab. Is there a way to create only one mesh collider from all these meshes? Or do I need to create one for each part I want to collide? Another thing is that when I choose generate colliders and drag it into my scene the object does not have a mesh collider, but it did collide with the cube like i said, so it has to have some sort of collision... Well, I hope Ill figure it out. And thanks for the detailed answer again.

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.

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

Terrain collider is inaccurate 3 Answers

All colliders no longer work. 0 Answers

Problem with colliders going through platforms 2 Answers

Character becomes detached from own collision capsule and sinks when moving over certain parts of terrain 1 Answer

Terrain - Detect collision coordinates? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges