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 /
  • Help Room /
This question was closed Jan 17, 2016 at 07:56 PM by Fattie for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by RLin · Jan 16, 2016 at 09:02 PM · rigidbodycar

What is the best way to calculate the performance stats of a car in a racing game?

Prior to buying an upgrade, I would like to let the player see how the performance stats of the car, such as 0-60 mph acceleration time, 60-0 mph braking distance, top speed, lateral grip in gs, etc. will be affected. There are many upgrades ranging from engine enhancements to body modifications that reduce rigidbody drag. What is the best way to use all of these numbers to calculate a car's performances?

Comment
Add comment · Show 9
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 Fattie · Jan 17, 2016 at 06:36 PM 1
Share

realistically you're just going to have to get and use the famous Edy's Car Package from the asset store.

program$$anonymous$$g cars is a HUGE, HUGE, HUGE engineering job. it's the sort of thing a $$anonymous$$m of people spend a year on. you're not realistically going to be able to start off and do it

avatar image hexagonius · Jan 17, 2016 at 06:40 PM 0
Share

See the wheel friction curve on this post. That alone is something that really needs some math:

http://docs.unity3d.com/$$anonymous$$anual/class-WheelCollider.html

avatar image tanoshimi · Jan 17, 2016 at 06:56 PM 0
Share

Are you trying to create a realistic driving simulator, or an arcade racer?

avatar image RLin · Jan 17, 2016 at 07:00 PM 0
Share

The game is for mobile, so I'd like to stay away from wheelcolliders, especially because I can have upwards of 10 cars that require accurate physics (traffic cars use a separate, less expensive physics system). I am using a physics system that I created myself. It is simply a frictionless collider for the wheels that uses rigidbody.addforce() to move. The physics are mostly arcade-like.

avatar image RLin · Jan 17, 2016 at 07:08 PM 0
Share

That still leads back to my original problem. Even if the measures are unitless, a quicker car should have a faster acceleration stat value... But how would I calculate that acceleration stat? Everything from tire grip to gearbox efficiency to engine torque to rigidbody drag still needs to be factored in.

avatar image tanoshimi RLin · Jan 17, 2016 at 08:44 PM 0
Share

To answer how acceleration, torque, speed, friction etc. are related, you might want to invest in a copy of Physics for Game Developers. But, like I said, you can use any number of stats and any formula you want to combine them - I wouldn't worry about physical accuracy (and certainly not for a mobile game!)

Show more comments

1 Reply

  • Sort: 
avatar image
3
Best Answer

Answer by tanoshimi · Jan 17, 2016 at 07:06 PM

In that case, I'd recommend you avoid expressing stats in any kind of units such as mph, gs etc. - go for unitless measures of "acceleration", "top speed", "drag", "handling" etc. as is common in almost all casual racing games - that way you can combine them using any function you want to get a result that feels right (which, ultimately, is what games should be about), rather than one that is physically accurate.

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

Follow this Question

Answers Answers and Comments

35 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

Related Questions

Car steering on a Rigidbody (Mario Kart) 0 Answers

We can't give snake movement to 3D car 0 Answers

GameObject fall Slowly [C#] 1 Answer

Car not shooting like bullet properly 2 Answers

troubles setting center of mass with rigid body in a car script 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