Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 $$anonymous$$ · Apr 27, 2020 at 09:41 PM · carcar gamecar physicsrealisticwheel colliders

How to make traction control for car?

Hello again!

I am trying to do a traction control for my car, that is, when I accelerate suddenly, the RPM goes up faster and the car slides slightly, what I did was modify the wheelcolliders when the gear change is less than 1, but not It convinces me (Rear traction bool = rear wheels acelerate).

             if(RearTraction == true && Gear <= 1f)
             {
                 WheelFrictionCurve frictionCurveTI = WheelTI.forwardFriction;
                 frictionCurveTI.stiffness = TractionStifness;
                 frictionCurveTI.extremumValue = TractionExtremumValue;
                 WheelTI.forwardFriction = frictionCurveTI;
                 
                 WheelFrictionCurve frictionCurveTD = WheelTD.forwardFriction;
                 frictionCurveTD.stiffness = TractionStifness;
                 frictionCurveTD.extremumValue = TractionExtremumValue;
                 WheelTD.forwardFriction = frictionCurveTD;
             }else{
                 WheelFrictionCurve frictionCurveTI = WheelTI.forwardFriction;
                 frictionCurveTI.stiffness = 0.2f;
                 frictionCurveTI.extremumValue = 20000f;
                 WheelTI.forwardFriction = frictionCurveTI;
                 
                 WheelFrictionCurve frictionCurveTD = WheelTD.forwardFriction;
                 frictionCurveTD.stiffness = 0.2f;
                 frictionCurveTD.extremumValue = 20000f;
                 WheelTD.forwardFriction = frictionCurveTD;
             }

I am trying to do something like this (watch the second 0:07): https://www.youtube.com/watch?v=tJf6AZ01Mbg

Thank you!

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
0
Best Answer

Answer by JonPQ · Apr 28, 2020 at 12:28 AM

if wheels are slipping, reduce the power to wheels quickly... say 10% per frame... until they stop slipping... once they are gripping... start increasing the power again ( but slower, say 5%). this will keep the wheels mostly gripping. You'll need to play with the 10% and 5% numbers though... depending on power and gearing of your car, 2wd or 4wd and surface slipperiness. ( you could have different settings for different surfaces, like off road vehicles do)

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 $$anonymous$$ · Apr 28, 2020 at 03:04 AM 0
Share

Thank you!

avatar image JonPQ $$anonymous$$ · Apr 28, 2020 at 04:21 PM 0
Share

for the effect at 007 in the video you linked... that is slightly different from traction control. That is combining it with "Launch control" sort of.... You'd apply full brakes to front wheels, then power to rear wheels with traction control. You may need to fake this a bit depending on how accurate your physics are... but if your front brakes and grip, can provide more force than your rear wheels.... the car should stay still, while your traction controls will alternately slip and grip rear wheels. good luck. :)

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

124 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 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

Shift gear with own RPM? Help please! 0 Answers

Better RPM?? 0 Answers

transmission clutch help! 1 Answer

how to rotate car to camera direction using wheel colliders. 1 Answer

Car Gearbox script 1 Answer


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