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
2
Question by Erisat · May 18, 2014 at 05:22 PM · vector3floatprecisionoriginfloatingpoint

maximum distance from origin (float precision)

Ok, so players can travel up to about ~12km from origin in many directions. I believe I would need CM accuracy (player is about 1.5m in height) to produce desirable effects. My research on floating points has led me to believe that floats have ~7.2 decimal places of precision. 12,000.01 has seven digits, and would have cm accuracy, is this assumption correct? I have seen people claim that float precision has been the cause of issues in multiple cases, some claiming around 20km, others around 40km, and I saw one guy post a quote from unity reference saying something along the lines of 99km should be fine, but a warning will generate and issues arise past that. I have not seen this in the reference myself, he did not post a link.

Could someone clarify this for me? is my world too big to have players moving accurately at such distances? If not, could i push it to 20km safely? That is the biggest I could imagine ever using. I want to know the limits before I wing it with trial and error.

Comment
Add comment · Show 2
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 Jeff-Kesselman · May 18, 2014 at 05:28 PM 0
Share

World coordinate size is relative. You can assign any scale you like to your coordinates.

But if you are expecting to have a continuos scene big enough that you cannot fit it all into an appropriate range of a float when properly scaled, I would reconsider your plans as its not likely to fit in memory or otherwise scale to that sort of size, anyway.

avatar image AndreiMarian · Jan 06, 2021 at 12:52 AM 0
Share

Google keeps popping this when searching "unity floating point range limit" or alike. Hence the necro. So eventually, what is the $$anonymous$$imum reliable range? According to comments in youtube.com/watch?v=G5UTyC6IpSI it can get as low as 3000 units (shadows). The inspector warns at 1000000. Can we have a definitive response? Some actual value we can count on? Also see this post in the forums.

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by Elric · Jun 09, 2015 at 06:29 AM

Great explanation can be found here

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

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

23 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

Related Questions

Convert double to float for Vector3 1 Answer

Vector3 using Doubles Instead of Floats 2 Answers

Losing float precision when adding to Vector3 1 Answer

CharacterController.Move precision 1 Answer

Precision problem when moving Rect values 2 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