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 ENDAS_ORIGINAL · Aug 16, 2020 at 10:29 AM · wheelcolliderfrictioncarsracing gamedriving

why is sideways tire slip separated from forward slip on wheel collider?

Hi, I finally understood why my car in unity can't drift/powerslide like cars do in other racing games. Feel free to skip the boring part and only read the question down below if you know this issue.

problem:

Not realistic car grip/drift happens because tire slip value (from which the tire grip is evaluated) is separately measured for forward and sideways friction of wheel. That means when you are in a turn with RWD car and you give car more throttle, rear tires lose forward grip and start to slip forward but car won't start to drift sideways like in reality because even though rear tires started slipping forward, sideways slip is still the same thus there will be no change on sideways friction curve and car will not lose any sideways grip. For this same reason cars with unity wheel colliders can't do handbrake turns because rear wheels will start to slip forward but that only influences forward grip not sideways.

real tire physics:

From a physics standpoint it's obviously not realistic because when tire starts to slip it goes from static friction where it sits on road to kinetic friction where it is doing lots of little jumps and this "jumping state" of kinetic friction affects tire grip in all directions not just forward or sideways separately.

my theoretical solution:

So the obvious solution would be that we can keep separated friction curves (because of different tire tread designs) but the slip value for these friction curves must be only one, evaluated as magnitude of vector2 of sideways and forward tire movement (slip). Unfortunately we can't modify slip value only extremum, asymptote and stiffness of friction curve.

finally the question:

Is there something that I am missing with separated forward and sideways slips to make car drift realistically and if not, is there any workaround with friction curve parameters to fix this issue or can you suggest me some alternative wheel colliders which doesn't have this issue?

THX in advance :)

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

2 Replies

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

Answer by ENDAS_ORIGINAL · Aug 19, 2020 at 01:34 AM

After I posted another a bit more simplified question regarding this issue https://answers.unity.com/questions/1762293/how-to-make-handbrake-turn-or-powerslide-with-whee.html?childToView=1762679#comment-1762679 It turns out that this really is one of few current wheel collider's issues. Handbrake turning can easily be simulated with code that for example decreases rear wheel colliders sideways friction stiffness or extremum value (stiffness works better) when player uses handbrake. Throttle controlled power-slides are more complicated to accomplish with wheelcolliders, I tried to linearly decrease sideways stiffness or extremum value on rear wheels sideways friction curve when their forward spin exceeded extremum spin which helped but car was hard to control however if you have time for optimizing this kind of algorithm, you probably could make it work at some point. Another approach would be to apply a little side force on rear of the car to make it drift under specified circumstances. But if you really want to have fun and a realistic vehicle physics I highly suggest getting some vehicle physics system from unity asset store or alternative wheelcolliders from github.

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 Spip5 · Aug 16, 2020 at 08:14 PM

I think it makes perfect sense to have two separate frictions. Take an exemple of a car being thrown sideways on ice. You would have side friction due to momentum, and forward friction if you start accelerating, result in two friction combining/competing to actually move the car. The same logic applies for any surface. You start drifting when the momentum of the car increase sideway drift, and your forward drift cannot compete anymore.

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 Spip5 · Aug 16, 2020 at 08:19 PM 0
Share

Adding to the comment, if your sideway drift is too strong, you're in for some barrels rolls while trying to drift. To answer your question there is no perfect balance, it will very depend on the surface you are tryng to simulate. You can modify the slip bahaviour, the engine takes care of finding the value for you based on momentum and acceleration.

avatar image ENDAS_ORIGINAL Spip5 · Aug 16, 2020 at 09:57 PM 0
Share

Thanks for answering :) I kinda get what you mean by separating forward and sideways friction but my point is that the slip value for both friction curves of wheel collider should be the same, (should be magnitude of vector of both sideways and forward slip) because how can you make for example handbrake turn with current wheel coll. system when if you engage handbrake and rear tires become locked, only the forward slip value increases causing forward friction curve to go closer to asymptote value and therefore losing forward grip but sideways slip value stays the same so no grip change occurs. Really all I wanna know is how am I supposed to make handbrake turn :D or power slide controlled by rear wheels torque because in my opinion, it is not possible with current unity wheel colliders.

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

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

Related Questions

Multiple Cars not working 1 Answer

I am making a racing game and I cant figure out how to calculate the angular velocity for my custom wheel collider 0 Answers

How to make car accelerate/decelerate over time 2 Answers

How is wheelCollider RPM calculated exactly? 1 Answer

How can I get current lateral and longitudial friction forces from standart WheelColliders? 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