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 Bunnybomb7670 · Aug 16, 2013 at 05:48 PM · mathoffsetroundingout of bounds

Unity Position Error?

Basically, i have found that unity really does have some issues when it comes to positions, instead of showing "0" it shows "3.814697e-06" ( which equates to " 0.000003814697 " ) instead, why does it even show this value?!

Here is my proof :

( Look at the highlighted red area of the images )

( The chunk 8 blocks away from it ) : http://i.imgur.com/9Ch6fzN.png

( The " gliched " chunk ) : http://i.imgur.com/2HIR4rW.png

Could anybody link me to the cause of this issue?

Comment
Add comment · Show 6
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 Bunnybomb7670 · Aug 16, 2013 at 05:54 PM 0
Share

ok thanks, i was really getting annoyed about it :)

avatar image Joyrider · Aug 16, 2013 at 05:55 PM 0
Share

Just for the record "3.814697e-06" does NOT equates to 3814697 but 0.000003814697. And that is floating point for you... For all intends and purposes it is still visually 0

avatar image Bunnybomb7670 · Aug 16, 2013 at 05:57 PM 0
Share

yeah, i noticed that maths error, i forgot the "e-" part, thanks for noting that :) , i will accept robertu because he explained it more, and the reason why this is much of a big deal to me is because my chunk system looks for a specific value, which even when offset that tiny amount does not get found :)

avatar image Joyrider · Aug 16, 2013 at 06:01 PM 0
Share

He should change his comment to an answer for you to accept it though ;) You just thumbed it up, that's it :p

avatar image Bunnybomb7670 · Aug 16, 2013 at 06:08 PM 0
Share

yeah, best i can do until he upgrades it :)

Show more comments

1 Reply

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

Answer by robertbu · Aug 16, 2013 at 05:52 PM

Actually 3.814697e-06 equates to 0.000003814697. In other words very nearly 0. It doesn't show the value because of all the zeros. Floating point precision has been asked about and answered many times on this list. This is not a Unity issue, but an issue shared by any language or app that is using floating point numbrs. Do a Google search for "Unity3d float precision".

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

17 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

Related Questions

Rounding to multiples of 0.5 1 Answer

Aligning objects to a grid with an offset 0 Answers

Need the localPosition equivalent of this script 2 Answers

Having Trouble with Texture Tiling and offset values. Very specific case. 2 Answers

A Perfect Question for Bunny83 hehehe 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