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 Somian · Mar 15, 2012 at 10:19 AM · wheel colliderwheel colliders

How to connect wheel colliders to chassis

Hi there,

I'm trying to build a car rig but I don't have a clue how to connect the wheel colliders. I used this http://unity3d.com/support/documentation/Components/class-WheelCollider.html to create a car with wheels colliders separate from the physical wheels. However, the car chassis is not connected to the wheels and this manual page doesn't state how to do this. I also watched some tutorial video and googled around a bit but everybody seems to skip the task of actually connecting the wheels because it seems obvious but it isn't obvious to me :X


This is how it initially looks in the editor: http://somian.net/stuff/forums/unity/WheelColliders/col1.jpg


but this is what I get when I start the game: http://somian.net/stuff/forums/unity/WheelColliders/col2.jpg


[preview of external content removed for GDPR compliance as it was including 3rd party cookies]


the truck falls through the ground (until the chassis box collides with the ground) but the wheel colliders (the physical, not optical ones) are still are still "standing" on the ground. But how can I connect these :X In a video, it looked like this would automatically work if the wheel colliders are child objects of the chassis objects but that's not the case.

Comment
Add comment · Show 3
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 syclamoth · Mar 15, 2012 at 10:26 AM 0
Share

What is your transform hierarchy?

avatar image Somian · Mar 15, 2012 at 10:30 AM 0
Share

currently

 monstertruck
     wheel_frontLeft
         graphics
         physics(wheel collider)
     wheel_frontRight
         graphics
         physics(wheel collider)
     wheel_rearRight
         graphics
         physics(wheel collider)
     wheel_rearLeft
         graphics
         physics(wheel collider)

but I also tried

 monstertruck
     wheel_frontLeft_graphics
     wheel_frontLeft_physics
     (etc)

and it didn't work :/

avatar image syclamoth · Mar 15, 2012 at 10:32 AM 0
Share

How many rigidbodies are there in there?

1 Reply

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

Answer by syclamoth · Mar 15, 2012 at 10:31 AM

No, I've decided. (Sorry about the deleted posts). Make sure the wheels don't have rigidbodies, and then make all four wheels transform children of the body. It works just like any other compound collider, only with weird physics on the end.

Comment
Add comment · Show 5 · 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 Somian · Mar 15, 2012 at 10:35 AM 0
Share

Awh, thanks! that error message stating that the wheels need rigid bodies tricked me into thinking I'd have to attach rigidBodies to every object with a wheelCollider but it actually meant that it required the chassis to have a rigid body (which I created afterwards).

works now :)

avatar image syclamoth · Mar 15, 2012 at 10:40 AM 0
Share

Wow, that was it? To be honest, I was actually guessing...

avatar image POLYGAMe · Sep 28, 2012 at 04:01 AM 0
Share

HAHA! I had the same problem! Had rigid bodies attached to all the wheels. DOH! Was pulling my hair out! Would have pulled other people's hair out too, if they were here! :P

THAN$$anonymous$$S!!!

avatar image jamie lowes · Apr 16, 2014 at 05:13 PM 0
Share

I did exactly the same thing, 5 rigidbodies on peered objects. I got it working okay, but wanted to teleport the whole thing. And teleporting objects with joints creates freakiness!

Now have a chassis with a box, and 4 child objects with wheel colliders and no rigid bodies.

Thanks for this thread!! :D

avatar image tiagoorlando · Feb 26, 2018 at 02:38 PM 0
Share

Had rigid body componentes on all wheels too, thanks.

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

10 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

Related Questions

Wheel collider bounce backward 1 Answer

WheelCollider invisible 0 Answers

Directional wheel collider suspension? 0 Answers

The car flies away when wheel collider touch walls or other objects 1 Answer

Wheel collider problems 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