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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by Wolfdog · Sep 05, 2014 at 05:27 PM · colliders

Wheel colliders not detecting mesh colliders

Hello,

I have made a race track using Google Sketchup 8 and exported it as .dae. I've then imported it into Unity to use with a car. I added mesh colliders to every object on the track and the track itself. To my car, I've also added mesh colliders. It also has a rigidbody. When I press play, the car falls through the track. When I add wheel colliders, the car still falls through the track. When I add box colliders to the car, it stays but that is not an option for me. I want my game to be as realistic as possible, using wheel colliders to drive the car. Also, checking Convex at the mesh colliders makes the game unrealistic, so it's not an option either. Is there a way in which I can get around this?

My terrain is uneven, that's why I can't use box colliders on it.

I've seen some impressive car games made with Unity, so I'm sure there is a workaround.

alt text

image.jpg (89.4 kB)
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

1 Reply

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

Answer by hangemhigh · Sep 06, 2014 at 02:08 PM

Only use Mesh Collider when it is needed. Instead of using Mesh Collider for everything in your scene, use Compound Colliders for your environment. A way of making a simple compound collider is to create many empty Game Objects then assign colliders to each one until you are sure that the colliders covers everything that can be hit by the car. With compound collider, you can use all type of colliders such as box, sphere, capsule, and mesh colliders together. You can also scale, rotate or translate the collider to match the location of your 3D Object.

Make sure these colliders are child of your environment objects so that when you move your objects, the colliders will move with them. The car itself should have compound collider or mesh collider with Bonvex turned on. Add Wheel Collider to the wheels and change the radius to match the size of your wheel. Still not Realistic?

Add a physics material to your wheel with the following setting: Dynamic Friction: 0 Static Friction: 0 Friction Combine: Minimum

This sometimes smooths out the friction from the collision with the track.

I don't know how your track is made but your track is suppose to be modeled in pieces. It shouldn't be one piece. The middle of the track should be constructed with small piece of planes so that mesh collider can easily be assigned to them. This will also make the mesh collider look realistic when you enable convex.

Still not Working? There is a plugin that can help you. I've used it before so I know it will help but it should be your last resort. Concave Collider So to conclude this:

1) Add Pysics Material to smooth out the wheels movement and make it look realistic. Also add Physics Material to the wheels with the setting I provided above. You can adjust it after.

2) Try modeling your track in pieces instead of in one bug chunk, then assign compound colliders to objects such as walls and grasses. Assign Box collider to the middle of the road that your car is suppose to pass through.

3) Use box Collider for the middle of the track where the wheels will be touching with the track. You can scale the collider to match the size of your track. then use wheel collider for the wheel. Make sure to rescale,move the wheel Collider to match the size of the wheel.

4)If you decide to use Mesh Collider for the track and Mesh Collider for the wheel, you should enable Convex on both the track collider and the wheel collider.

5) The worst mistake people make is to place the car a little bit below the track. It will fall through the track when you hit the play button. So, make that the car is above the track/plane and that it is not touching the track/plane before pressing the play button.

6) Use the Concave Collider Plugin

I suggest you try this in this order #5,#3,#1,#4,#2,#6.

3 and #1 should do it but let me know.

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

22 People are following this question.

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

Related Questions

physics.OverlapSphere colliders 1 Answer

How to do static collision checks? 1 Answer

Why there is no Collider.IsTouching(...) ? 2 Answers

How do I prevent characters from being able to land on each others heads? 1 Answer

OnCollisionEnter for other gameobjects (C#) 2 Answers


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