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 GLeBaTi · Jan 06, 2015 at 01:58 PM · c#scalesizefloat

Max scale in unity3d

Hello. What is the max scale for objects in unity3d + scale-factor?

Can i make planet size = 60000 and ship size:0.001?

If max scale = 100000, then why? Float has value limit from -3.402823e38 to 3.402823e38.

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 GameVortex · Jan 06, 2015 at 02:55 PM

You can set all values of a transform to as high as floats values can go. Physics simulation and everything will run as normal. The problem you run into is the Imprecision of float values. Which gets really noticeable with large values.

A simple test/example I use to show people to demonstrate this is:

1: Create a new scene

2: Create a Sphere (with collider)

3: Put the sphere at x position 100 000.

4: Focus the sceneview on the sphere and try to rotate the camera around it. Already now you can see slight jittering of the sphere.

5: Set the x,y,z scale of the sphere to be 0.01.

6: Focus the sceneview on the sphere and try to rotate the camera around it. You will see that the collider and sphere will jump all over the place.

This is the result of the imprecision of floating numbers. It is not that the sphere actually moves around (its transform position is static), but its position is too imprecise to actually draw correctly every update or the camera movement is too imprecise or similar.

So this is something you need to take into consideration when working with large numbers.

Space simulators with accurate scaling (for example Kerbal Space Program) solves this issue by never actually moving the camera away from the center of the scene, but rather moving all objects around instead. So when focusing on a planet far at the edge of the solar system, the entire solar system is moved to position the planet correctly in the center (0, 0, 0) of the scene.

Comment
Add comment · Show 2 · 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 GLeBaTi · Jan 07, 2015 at 01:56 PM 0
Share

And what is the max/$$anonymous$$ ratio beetwin size and position?

avatar image GameVortex · Jan 07, 2015 at 02:24 PM 0
Share

There is no ratio, or max and $$anonymous$$ value (except max and $$anonymous$$ float values). Just keep in $$anonymous$$d that the larger the values the more imprecision you get.

avatar image
0

Answer by tanoshimi · Jan 06, 2015 at 02:06 PM

Not sure why you couldn't have done this yourself, but never mind...

alt text


scale.jpg (21.5 kB)
Comment
Add comment · Show 2 · 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 GLeBaTi · Jan 06, 2015 at 02:35 PM 0
Share

what about physic simulation?

avatar image TonicMind · Mar 03, 2015 at 03:09 AM 0
Share

Just thought I would add this comment, if you're really in to computer program$$anonymous$$g / scripting and computer science, and math is no problem for you (its really all basic algebra and mathematics) then a great book I would recommend any budding programmer is Write Great Code by: Randal Hyde. It may look intimidating at first but its actually an easy read and quite fascinating my opinion! Its chock full of useful tips, and facts about computer program$$anonymous$$g. Chapter 4 of Volume 1 (there are four of these books) will give you great insight in to what floating point values are, how they work, and why they are so imprecise at large vs small scales.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Unity3d C# select statement for GUI.TextArea 1 Answer

Make inspector show changes of class variable value in function? 1 Answer

Need help cycling through an array with a 'for' loop. 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