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 jpthek9 · Jan 14, 2015 at 12:12 AM · physicsprecision

How Accurate is Unity Physics?

I've heard a lot that floating point calculations aren't extremely precise, and Unity's transforms and physics uses floats. How accurate then, can Unity's physics be? On a small scale world where positions go up to only 3 digits and physics are run at .1 timestep, can it be accurate enough for a deterministic game? I ask this because I need determinism for a lockstep game that can span up to 1 hour lengths.

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 jpthek9 · May 09, 2015 at 12:28 AM

After tinkering around for a while, I managed to create a deterministic physics engine. Check out the thread here: http://redd.it/358hl6 if you're interested.

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
3

Answer by Eric5h5 · Jan 14, 2015 at 12:20 AM

The physics aren't deterministic, and can have different results when the same scene is run multiple times.

Comment
Add comment · Show 4 · 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 jpthek9 · Jan 14, 2015 at 12:26 AM 0
Share

Yes, but how deter$$anonymous$$istic can it get? I'd think that physics on a large universe would be considerably less deter$$anonymous$$istic. Also, I'm thinking of rounding the results of the physics outputs (I need to interpolate between .1 timesteps anyways) to maybe the first decimal place. From personal experience, do you think something like that could work?

avatar image Eric5h5 · Jan 14, 2015 at 12:36 AM 0
Share

I don't think it will work because the built-in physics is inherently not deter$$anonymous$$istic, and that's not something that can be bolted on afterward; it needs to be designed in from the beginning if you want any guarantees.

avatar image jpthek9 · Jan 14, 2015 at 12:38 AM 0
Share

Oh, thanks. I'll find some kind of other solution. Thanks :)

avatar image jpthek9 · Jan 14, 2015 at 04:23 AM 0
Share

I'd like to open up this question again to ask one more related question: Is collision detection decently accurate? I understand how physics inaccuracies can pile up but can I simply map my own movement calculations to the rigidbodies and calculate interactions with OnCollisionEnter? Also, will using 2d physics help with this task?

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

26 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

Related Questions

Phyics.Raycast alternatively returns True/False with static input 2 Answers

Can Achieve Deterministic Physics ? 1 Answer

Is Physics.Raycast deterministic? 1 Answer

Deterministic physics, same platform 5 Answers

2D 360 degress platformer example needed 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