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 Shryq · Apr 27, 2015 at 08:55 PM · scripting problemcollisionwheelcollider

[C#] Wheelcolliders issues in 5.0, collision

http://pastebin.com/qnM5df7m

Here is the script, it works like a gear subtractor, there is a maximum difference of RPM in the two sides, which is controlled by the steering axis. Worked flawlessly in 4.2, and I'm not actually sure anything is wrong with the script itself, because the wheel rotate in the proper direction and everything, but the wheelcolliders do some weird things. The circle that represents the wheel isn't aligned with the line showing the suspension axis, and I'm not sure how to get them to align, turning a parent of the parent, rotates it in an odd fashion, but rotating the parent or the object itself doesn't. In addition the wheels won't collide with anything, and I can't for the life of me figure out why.

This is how it looks normally. http://puu.sh/ht6wb/d3218f23ce.jpg

If I rotate the object with the collider: alt text

If I rotate the parent object: alt text

If I rotate the parent's parent I can get them to line up, but no amount of finagling after that can get them pointed down and aligned. alt text

Comment
Add comment · Show 1
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 Shryq · Apr 28, 2015 at 03:32 AM 0
Share

$$anonymous$$mmkay. So, if any object in the hierarchy above it are rotated in any way at all, you get that weird suspension rotation. Fixed that, but now the instant the wheel touches the ground, it imparts some ludicrous force onto the tank, and it goes flying off the map, or it just goes straight through the ground.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by RLin · May 04, 2015 at 10:55 AM

"but now the instant the wheel touches the ground, it imparts some ludicrous force onto the tank, and it goes flying off the map, or it just goes straight through the ground." What is the mass of the tank's rigid body? Unity 5 wheelcolliders require realistic values to function correctly. The default rigidbody mass is 1 kg. Considering that the suspension of each wheelcollider is designed to handle a car ranging from 1500-2000 kg in mass, it makes sense that your tank would go flying.

Comment
Add comment · Show 2 · 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 Shryq · May 13, 2015 at 02:33 AM 0
Share

The tank weighs 20 metric tons, or 20,000kg. That's not the issue. Although changing that value doesn't seem to change anything... which may be because i have a value that is proportional to the tank mass... Gunna go check.

avatar image Shryq · May 13, 2015 at 06:08 PM 0
Share

So I got it fixed, seems like it just didn't like the wheel colliders that were created in 4.xx, when I made new ones it worked just fine. Same parameters and everything.

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

Having trouble turning a Transform movement into a Rigidbody force. Code included 1 Answer

Goal Collision for pong game 0 Answers

How to use OverlapCollider? 1 Answer

Box goes through walls 2 Answers

OnCollision not getting called,Collision problem in game. 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