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 MikeErty · Aug 21, 2013 at 03:42 PM · flickeringwheel colliders

Flickering wheel colliders

Simple enough to describe but baffling. I originally had a car with 4 wheels. It's a side-on trials-style game. It all works and is actually online to play. The wheels have wheel colliders.

However, when the car freefalls for more than about three seconds AND if the car is more or less horizontal (so it would land right-side up) the wheels start flickering up and down. The range they flicker goes from their most 'depressed' position (or 'the highest point of the suspension') to the lowest. Really fast, from one frame to the next. It was so distracting that, after weeks of fruitless tinkering, I turned it into a hovercraft (simply disabled the tyre mesh renderers but kept all the physics in place since they were working fine apart from the flickering).

Has anyone encountered this before? I'd prefer to have tyres on my vehicle despite the hover effect looking cool.

EDIT by 'online to play' what I meant to say was 'it's playable in web browser right now.' But I won't go plugging it as it's sort of an alpha and I don't want to start advertising on unity answers lol.

Comment
Add comment · Show 6
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 willatwood · Apr 08, 2014 at 09:58 PM 0
Share

did you ever resolve this issue? struggling with this exact same issue right now.

avatar image MikeErty · Apr 09, 2014 at 07:16 AM 0
Share

Sadly not, it's still a hovercraft! I have a feeling it might work in the newer versions of Unity since some huge changes have been made but I'll have to dig around for the project file. What version are you using right now? And to clarify - the wheels are physically moving rather than flickering on/off?

avatar image willatwood · Apr 11, 2014 at 12:07 AM 0
Share

Dang! I'm using the newest version of unity and it still happens. I basically have the same problem you described-- the wheels flicker up and down very quickly when it's in freefall (with the car more or less horizontal like you said). I've been playing with the values of the wheel colliders for so long now, but to no avail. I had an unrealistically scaled up (5x scaled) version of the car (that I made as a shortcut for dealing with a different problem I had) that didn't seem to have any flickering issue whatsoever. However, I needed to scale the car back down again so that it would behave more realistically with the physics/gravity, and the flickering problem returned. furthermore, my car is now having significant problems hitting jumps without the car losing traction on the jump and going into an off axis spin. let me know if you find anymore insight into this problem, or the general functionality of wheel colliders and their relationship to the car physics. thanks!

avatar image MikeErty · Apr 12, 2014 at 05:19 AM 0
Share

I know this is sort of the wrong way round since I'm the OP and you're the one commenting but you at least have easy access to your project :)

Have you checked the mass for the wheels? It's a long shot but I was recently doing some work on a ponytail with bones and rigidbodies using character joints. I noticed they were going all over the place when they were twisted too much in playback, flickering this way and that. So I looked around and somehow the mass of the RB's had been reduced to 0.01 yet they were still acting like they had more substantial weight. I Changed them back to 1 and it fixed them.

This bit is just an observation: I Was playing plants vs zombies on xbox one last night (the third person shooter version). Upon starting the game all the human players fell through the bottom of the world and dropped into oblivion forever. As my character dropped it eventually started flickering up and down on the screen just like our wheels! I thought it was oddly similar so it made me wonder if this was a general physics based issue that cleverer people than me know happens a lot with dropping objects in physics engines.

Hope some of that sparks someone elses imagination and they realise what's going on :)

avatar image willatwood · Apr 22, 2014 at 09:58 PM 0
Share

yeah I messed around with the mass of the wheels, and it didn't really affect anything. Currently using a mass of 1. I also messed around with the mass of the Rigidbody associated with the car, and no difference also. I really have no clue why it isn't working with this version when it seemed to be fine when the car was the size of a house haha. I'm also frustrated that the handling going off jumps is severely worse than it was with the big car-- right when it first hits the jump, the spring reacts too violently and makes the car not go off the jump straight. I've tried varying every value in the wheel colliders (trying both isolating each variable and also changing multiple variables at once). I think the flickering is ultimately a sign of instability in the physics simulation itself, and I'm pretty much out of options for things to change to try and fix it. Really hope someone from the Unity $$anonymous$$m could take a look at this issue and respond to us.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by sandhillceltic · Aug 22, 2013 at 01:59 AM

What is your texture type? I had the same problem. Try changing the wheel color to transparent, even if the texture is not. Worked for me. Good luck :)

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

Answer by aalstes · Oct 07, 2014 at 07:28 PM

I had a flickering problem and solved it by using WheelCollider.GetGroundHit instead of Physics.Raycast. The commented-out code caused flickering:

     // RaycastHit hit;
     WheelHit hit;
     Vector3 wheelPos;

     //if (Physics.Raycast(transform.position, -transform.up, out hit,wheelCollider.radius+wheelCollider.suspensionDistance) ){
     //    wheelPos = hit.point+transform.up * wheelCollider.radius;
     //    wheelTransform.position = wheelPos;
     //    airborne = false;
     //}
     if (wheelCollider.GetGroundHit(out hit))
     {
         // Code from http://answers.unity3d.com/questions/13180/using-wheel-colliders.html
         wheelPos = wheelTransform.localPosition;
         wheelPos.y -= Vector3.Dot(wheelTransform.position - hit.point, transform.up) - wheelCollider.radius;
         wheelTransform.localPosition = wheelPos;
         airborne = false;
     }
     else {
         // We're airborne. If we were already airborne in the previous frame, do nothing.
         if (!airborne)
         {
             wheelPos = transform.position - transform.up * wheelCollider.suspensionDistance;
             wheelTransform.position = wheelPos;
         }
         airborne = true;
     }        
Comment
Add comment · Show 1 · 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 zezba9000 · Aug 16, 2015 at 03:48 PM 0
Share

The problem with this is testing with Unity5.1.2 GetGroundHit returns an incorrect hit.point value. Seems like its one frame behind making wheel offsets impossible to do correctly.

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

18 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

Related Questions

Kindle Fire - Flickering UI on 2nd camera 1 Answer

Bumped Specular Terrain flickering. 1 Answer

Flickering screen when development build disabled 0 Answers

Dizzy screen when swipe.,Screen flick on swipe, swipe is not smooth? 0 Answers

Yellow / red screen flickering android build 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