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 /
avatar image
0
Question by Solokeh · Sep 11, 2016 at 12:58 PM · procedural generation

Is infinity plausible in Unity?

I don't need to know how to generate infinite levels, I got that. I just need to know how far I can push a single scene. I know the floating point imprecision gets wonky after 19,000 units, but is it possible to use every square inch of that radius without Unity bugging out? I've got levels with a few thousand rooms running just fine, but could I push it further without breaking the engine? Just wondering if I'll need to create new scenes after a while. Thanks for your answers to come!

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 AurimasBlazulionis · Mar 28, 2017 at 05:01 PM 0
Share

Hello, do you $$anonymous$$d accepting my answer since it is correct. It really makes me stay motivated to answer these questions.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by AurimasBlazulionis · Sep 11, 2016 at 02:55 PM

That is the point of floating point, it's precision gets lower when you go further. You can go to 19000 at normal scale fine, but if you scale things down to be half the size, you will be able to normally go until you reach 9500. The same if you make things bigger, you will be able to to move well over 19000 and it will look fine. Float after all has only 32 bits of information and you can not really do anything about it.

The solution you are looking for is called origin shifting. Basically you have to move player back to zero coordinates and other objects relatively when you reach some far distances. You can use some external classes like Vector3D to store actual player and other object positions in double precision values.

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 Solokeh · Mar 29, 2017 at 03:58 PM 0
Share

Not exactly. As I stated in the original question, I know about floating point and its limitations. I needed to know how many gameObjects, active or inactive, can exist in a scene without the engine breaking.

This really isn't applicable anymore, since I would now just delete and regenerate the level according to the player's needs, rather than hiding gameObjects.

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

68 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 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

InvalidOperationException: Operation is not valid due to the current state of the object 1 Answer

Can you use a height map on a plane? 0 Answers

why does my script not work even though I followed a tutorial? 0 Answers

Please Explain the Code 0 Answers

Infinite 2D cave generation 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