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 /
avatar image
2
Question by rsud · Jul 05, 2016 at 04:09 AM · sizespaceworld

max dimensions of Unity world space (bounds for the x,y,z values of vector3)?

From an object at world position vector3(0,0,0) what is the largest (+ and -) values I can use for x, y, z to place other objects?

I read that x, y, z, are floats. But its not clear what is the furthest away I can place objects from an object at 0,0.0 in world space.

Comment
Add comment · Show 1
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 rsud · Jul 05, 2016 at 04:11 AM 0
Share

...(bounds for the X,y,z values of vector3)...

2 Replies

· Add your reply
  • Sort: 
avatar image
6

Answer by Eno-Khaon · Jul 05, 2016 at 05:12 AM

For a single-precision floating point number, the absolute maximum possible value is approximately 3.402823 × 1038.

That doesn't mean the value will be of use, however.

Floating point numbers basically work like this:

You start with (sort of) an integer, such as 5492637. Then, you add a decimal point to it. The number becomes, say, 549.2637. This can also be represented using scientific notation as 5.492637e2.

Eventually, you won't see any change in the length of your initial number, but the exponent can continue to change. This is where floating point inaccuracy becomes more and more noticeable.

The smaller the value is, the more accuracy you'll have. The greater the value is, the less accuracy you'll have.

For example, let's use the same number and make it tiny and huge. 5.492637e-4 vs. 5.492637e10. Alternately, 0.0005492637 vs. 54926370000.

If both those base numbers are increased by 1, you'll see a change of either 0.0000000001 or 10000.

Now, how does this tie in to your original question?

Well, if your objects are placed far enough away from the center point of (0, 0, 0), you will have much less granularity on their movement. If your objects can only move 10000 units at a time due to being far away from the center, it simply wouldn't be practical for gameplay. Incidently, this issue plagued Kerbal Space Program in its early days, until they changed the game to move the universe around the player and not the other way around.

Finally, this is also why Unity offers a word of advice as well: It is not recommended to go any further than 100000 units away from the center (and the editor gives warnings to that effect, in fact), and it's probably wiser still to remain within 10000 when possible, to play it safe.

Comment
Add comment · Show 1 · 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 tanoshimi · Jul 05, 2016 at 05:57 AM 0
Share

Great explanation :)

avatar image
0

Answer by rsud · Jul 06, 2016 at 06:56 PM

Thanks!

I also learned to form the world around the player who is always at 0,0,0.

Since its a space game, and space is huge ( I''ve heard :-) ) I'll store their true position in a seperate double. They will only be renderable if within 10,000 of the plater.

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

45 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

Related Questions

iTween MoveAdd world coordinates Simple 2 Answers

Keeping the player inside the screen? 2 Answers

Unlimited world size in Unity3d (by a trick) & maximum speed? 1 Answer

Sizing Suggestions and a couple other questions 0 Answers

Particles in screen coordinates 1 Answer


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