-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a page on large world coordinates (double-precision floats) #6314
Add a page on large world coordinates (double-precision floats) #6314
Conversation
73d88c9
to
73a725e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great content! Could maybe mention the shifting-world-origin alternative approach that many games use, as thats a common workaround.
73a725e
to
7c7fcb9
Compare
I mentioned origin shifting in passing, but I don't know how to implement it. It can quickly get complicated (especially for multiplayer games), so it's mainly good to know for low-end mobile. I added a paragraph on resource saving and interoperability as well. I have some questions:
|
D'oh, yeah, thats enough already :)
Roughly: whenever player distance to origin exceeds the shift treshold, calculate the difference between player position and origin and shift everything's position in the game by that difference, so the player is at the origin again, but everything else is still at the same position relative to each other. Then, pile lots of bandaids and fixes on top as you run into different bugs and edge cases :P Those additional questions are good ones, no idea honestly, may try out the GDExtension thing. Regardless, I'll go ahead and merge this one now, and we can amend and iterate as needed if we figure out more :) Amazing work, as usual! 🎉 |
Note: This currently doesn't include the SCons option rename from godotengine/godot#67399.