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 Harper · Nov 28, 2012 at 03:15 PM · coordinatesprecisiondecimalfloatingpointworld coordinates

Custom World Coordinate system? Changing Space.World?

Hi, Im making an mmo and would like the server to allow a very vast world while the clients will still use the single precision float.

Is it possible to create your own custom world coordinates? and if so how do you change from what I assume is Space.World. How do you change it into your own custom system, maybe using Decimal or a double?

Thanks.

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
2
Best Answer

Answer by Southgrove · Nov 29, 2012 at 04:31 PM

Maybe i'm not getting the point here.. but..

if you have a "chunk coordinate" and a "character coordinate" so a character has the position chunkCoordinate(1, 3) and charCoordinate(12.4, 123,1) it would be (in the world) at (1012.4, 3123.1).

If you did that, characters could be reeeally far off and still have really good float precision (0..999).

You could create a "local universe" where 0,0 is in the center of the active chunk and include all neighbouring chunks (and their characters) and that should do it, right?

Comment
Add comment · Show 3 · 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 Harper · Nov 30, 2012 at 08:27 PM 0
Share

/facepalm Thanks, this is exactly what I needed.

avatar image rushlink · Dec 15, 2012 at 02:53 AM 0
Share

Was wondering how you got this implemented. I can't seem to wrap my head around how this would work, unless i build my own custom networking. Thanks!!!

avatar image bpears · Jan 25, 2014 at 01:05 PM 0
Share

but how would you define that character coordinate, when all you have to work with is world space, how could you base it off of the active chunk? I mean, wouldn't the 'chunk coordinate' ultimately still come down to a world coordinate that approximates its location, if the chunk itself is distant from world origin.

avatar image
0

Answer by Paulius-Liekis · Nov 28, 2012 at 04:11 PM

You can not change the precision. But you can shift center of the world to your desired place, this way you will need smaller precision.

Comment
Add comment · Show 3 · 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 Harper · Nov 28, 2012 at 05:10 PM 0
Share

So there is no way to change the base coordinate system and have everything direct to your system? Why not?

Also I knew about that, which is why I told you Im using it for an $$anonymous$$$$anonymous$$O server, where there is no perception of character because there are hundreds of them. So there is no way to change the world around the character... This is why I need to create my own coordinate system or it will be impossible to create a seamless $$anonymous$$$$anonymous$$O.

avatar image Southgrove · Nov 28, 2012 at 07:24 PM 0
Share

Shifting/offsetting the world around the current camera position should work for pretty much any world size. "Just" create the world in big chunks and offset those.

You could use a "Point2" struct (int x, y) for each chunk, make each chunk 1000x1000 units and have each integer in your offset point represent 1000 units. Voila.. Instant ginormous world.

avatar image Harper · Nov 29, 2012 at 03:41 AM 0
Share

Why cant anyone understand that a server has no perspective, so it has no point to shift the world around the person? What if someone is 2000 meters in the other direction from someone else?

it will not work, this i must change the precision of the world coordinates.

Does anyone know how to do this at all?

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

14 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

Related Questions

How to force shader to use high-precision floats on mobile? 1 Answer

Box doesn't move to the position as I expect 1 Answer

How to allow unityscript to see Decimal[]? 1 Answer

maximum distance from origin (float precision) 1 Answer

Scene scale and float precision 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