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 unity_5UuMRw312fOSgQ · Jan 19, 2021 at 02:46 PM · wheelcolliderwheel collider

WheelColliders turn outside down and floats away

Look, all i want to do is make a car. Every update there seems to be a new problem for me with WheelColliders, this latest one is tricky and i don't understand what is happening. Basically when i try to update my Wheel Transforms (which have the Colliders as components), they flip upside down but now around their own axis, actively flipping the car on its roof and then floats away in a diagonal line upwards and right. What... the... ####?

Also worth noting is that i tried setting localPosition instead but then they fell through the Plane i have the car placed on.

Here is the code:
private void FixedUpdate() { UpdateWheel(FLWheelCollider, FLWheelTransform); UpdateWheel(FRWheelCollider, FRWheelTransform); UpdateWheel(RLWheelCollider, RLWheelTransform); UpdateWheel(RRWheelCollider, RRWheelTransform); }

 private void UpdateWheel(WheelCollider col, Transform trans)
 {
      Vector3 pos;
      Quaternion rot;
      col.GetWorldPose(out pos, out rot);
      trans.position = pos;
      trans.rotation = rot;
 }
Comment
Add comment · Show 5
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 unity_5UuMRw312fOSgQ · Jan 19, 2021 at 02:55 PM 0
Share

Update: I separated the Transforms and Colliders into separate objects (used Empty Gameobjects) for colliders, then placed them in the same position, etc. Now they turn 90* so they lay horizontal instead of vertical...

avatar image unity_5UuMRw312fOSgQ · Jan 19, 2021 at 02:57 PM 0
Share

Okay great another update, didn't change the code. Worked like i described in my previous comment 3 seconds ago, started it again and guess what? Now they are not only horizontally rotated, they are also 20 meters from the car and underground...

avatar image unity_5UuMRw312fOSgQ · Jan 19, 2021 at 03:15 PM 0
Share

Okay i got it "working" atleast it doesn't do that but now motorTorque doesn't work, i followed a YT tutorial from 2020 that said "RLWheelCollider.motorTorque = inputY * motorForce;" nothing happens, it doesn't move. I hate WheelColliders, they are absolute trash.

avatar image logicandchaos · Jan 19, 2021 at 03:38 PM 0
Share

you mean like in Back to the Future 2?

avatar image logicandchaos logicandchaos · Jan 19, 2021 at 03:39 PM 0
Share

Roads? We don't need roads.. ;)

0 Replies

· Add your reply
  • Sort: 

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

111 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 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 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 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 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 avatar image

Related Questions

Instantiate prefab with WheelCollider. How can I do it? 3 Answers

Directional wheel collider suspension? 0 Answers

How can I rotate around and object with wheel colliders? 1 Answer

Is it possible to disable drift on WheelCollider? 0 Answers

GetWorldPose changes wheels position wrong 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