Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 David1901 · Jul 10, 2012 at 09:57 AM · transformpositionaxis

How far do the axis go?

What is the maximum possible x position an object can have?

Is this also the maximum for all the other axis?

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

1 Reply

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

Answer by Mattivc · Jul 10, 2012 at 12:40 PM

As far as i know the position of objects are stored as floats. Meaning that technically the maximum value for any of the axis is about ±1.5 10^45 to ±3.4 10^38 (http://msdn.microsoft.com/en-us/library/b1e65aza%28v=vs.71%29)

However because of the inaccuracy of floating points it is inadvisable to go above 5-6 digits numbers when dealing with 3D positions.

The Unity grid is 100.000 units, that is probably a good value to stay under. If you find yourself hitting this value you should rethink your implementation, and scale things down.

So short answer. Stay within -50.000 and 50.000 on all axis and you will be fine.

Comment
Add comment · Show 6 · 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 whydoidoit · Jul 10, 2012 at 01:26 PM 0
Share

Agreed - just one thing - scaling can be an issue when dealing with physics so be very careful, in general PhysX can seem to behave strangely when dealing with unrealistic sizes.

avatar image Mattivc · Jul 10, 2012 at 01:36 PM 1
Share

This is also correct. If you want the physics to be as realistic as possible then: 1 Unity unit = 1 $$anonymous$$eter

avatar image captaincrunch80 · Jul 10, 2012 at 01:45 PM 0
Share

If you scale the world, make sure you scale the gravity and masses the same way and you shall be fine.

A 4 unit high male should move double as fast as usual to the ground when falling from a double sized tower to make it look as if nothing was scaled.

avatar image Bunny83 · Jul 10, 2012 at 02:50 PM 1
Share

Don't forget there are more physical parameters like "Drag",

"Sleep Velocity", "$$anonymous$$in Penetration For Penalty", ...

It's better to stick with 1u == 1m

avatar image aksiluhi · May 31 at 09:17 AM 1
Share

This is otherwise correct but I don't think scaling will fix anything other than unity complaining about too large position values. By scaling everything down the precision needed to represent vertex positions etc. will also increase because objects are smaller. That means scaling the world doesn't actually give better precision relative to the world size (which I think is what matters). In general keeping objects close to the center and moving the world instead of the player (for example move everything closer to origin when certain distance is reached) are good ways to approach this problem.

avatar image Bunny83 aksiluhi · May 31 at 09:49 AM 1
Share

Yes, this is correct. What does help is using a floating origin approach and stay close to the origin as smaller values have more precision.


For games which want to model the vast distances of space, there are other techniques like an infinite far clipping plane. Here precision still falls off quickly with distance and the depth buffer degrades even faster with distance. However it allows you to draw huge distant objects and have them still sorted somewhat correctly.


Another approach for simulating space is projecting large distant objects / planets / stars into the view frustum and apply the correct parallax so it appears at the right position, even though it's actually much closer.


Though having the camera close or at the origin is one of the most important techniques.

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

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

transform.position.y and x or z + 1? 0 Answers

calculating my position from another object 1 Answer

Change position of camera on scene load? 1 Answer

Find Distance on Single, Relative Axis? 1 Answer

How do I make one transform rotation the same as anothers? 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