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
1
Question by TechJunk1e · Jun 16, 2014 at 11:09 AM · physicswheelcolliderwheel

Do wheel colliders account for wheel width?

hello, i am still fairly new to unity and want to make a sandbox game, that will have vehicles involved and i was wondering if there was any way to make my actual wheels act as wheel colliders, or if the unity wheel colliders could take into account customized wheel widths, because i noticed that the unity wheel collider is represented by a paper thin circle. and i am not sure if that is the reason why the last time i tried to make a car in unity it kept rolling over, i know that with wider wheels it adds more stability, and you can also send more torque through the wheels with less loss of traction.

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
1

Answer by gunpower · Jun 23, 2014 at 05:52 AM

You are correct, WheelCollider does not account for wheel width. It's not even a paper thin circle, actually. It is simply a single ray, with a bunch of extra bells and whistles. Generally speaking, you can't make your wheel model represent your wheel collider, as using a mesh collider would require it to be convex and would be prohibitively taxing for the physics engine.

Some people create their own with joints and/or the other simple colliders, like the sphere collider or capsule collider. They lean more towards simulations and racing games, though. Most who have ventured down that path have put tons of work into it, and are less likely to freely share the finer details - which is completely understandable once you start diving into it - and their results usually show up in the asset store rather than unityAnswers responses.

If your sandbox project doesn't need simulation quality, I suggest you stick with the stock WheelCollider approach. A few tips for that:

1) User Edy has posted pretty helpful stuff in the forums. Particularly, he has posted some great beginner values for the wheel traction parameters and supplied a little script that gives and arcade-like anti-swaybar that will help the car from rolling. It has a small side effect that makes it feel like the hand of god is keeping it stable but if your game is more arcadelike than simulation it works superb. Search the forums for his posts.

2) adjust the center of gravity by creating an empty gameobject to sit within your model so that you can position that object in the editor, and assign the CoG of the cars rigidbody to that gameobjects position when your car script starts up (instead of the default behavior where the rigidbody just picks the middle of all attached colliders). Position the CoG near the floorboards and slightly forward of center.

3) (and I just did this myself - never saw anybody else post this) don't position your colliders on the centerline of the wheel. Position them at the wheel face, so that the outer limits of the wheel are represented by the WheelCollider.

4) If you haven't downloaded unity's car tutorial, do so.

5) If you haven't checked out the optional "advanced physics model" inside that tutorial, do so!

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Wheelcolliders stuck in ground 0 Answers

Creating a simple wheel 0 Answers

Best Settings/Config Wheelcollider Tank 0 Answers

Calculate Distance using WheelColliders 3 Answers

WheelCollider spontaneous jumping? 0 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