Skip to content
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

Player far from origin jitter issue #46

Open
BlackStarMachine opened this issue Aug 15, 2020 · 2 comments
Open

Player far from origin jitter issue #46

BlackStarMachine opened this issue Aug 15, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@BlackStarMachine
Copy link

I stumbled into an issue. I was testing out a project and I noticed that when the player goes really far from the origin (0,0,0) position, like hundred of thousands units away, everything starts to jitter. So much that the game is basically unplayable.. How do you fix that? Do you move the world instead of the player? Wouldn't that be really bad for performance?

I know this is not really the project issue, but more of a feature, but feel like something that the infinite procedural terrain should avoid. 🤷

@BlackStarMachine BlackStarMachine added the bug Something isn't working label Aug 15, 2020
@TheEeveeLovers
Copy link

TheEeveeLovers commented Sep 28, 2020

This is because of an Integer limit, and this happens in Minecraft too, when you reach 32,000,000 blocks aka the 32-bit signed Integer limit.
64 bit 32 bit 16 bit 8 bit

@dogukankse
Copy link

@BlackStarMachine This problem is more related to game logic than terrain generation. You can search for "Floating Point Error" on this topic.
The simplest solution for this problem is to move your player back to the origin point after a certain limit and continue your terrain generation with that offset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants