Distance from origin problem!

Hello Guys and Girls!

This is my first, ever, post on unity forums and its almost 2 years since i started using the engine.
Bellow… is a video with my problem, that, i have not found yet a solution for it!
Shadows are disabled, HDRP have been used in this project(video showcase)!


https://www.youtube.com/watch?v=5-9EzNdbCl0

What i find strange is what happen when you open a new project with HDRP:

No flicker, judder or jitter or what the heck name of this problem is :frowning:
What have i done wrong?
Thanks for the help!

You are probably too far from the 0,0,0 coordinates (there is a limitation with what a float number can store, so when you are far from the origin you have less precision).
Google for floating origin.

Exactly. Keep your transform positions below/around 10k and you will mostly be okay. 100k is certainly not okay.

Yeah, saw but still awful :(. Any solution for this?
will terrain streaming eliminate this problem?

If you’re unsure how to do it, take a look at WorldStreamer.
https://assetstore.unity.com/packages/tools/utilities/world-streamer-36486
(Just to clarify, it’s not an ad, I just liked the asset and it solves the problem, I’m not affiliated with the publisher at all)

It does do exactly what you need: streaming in assets as you move around and floating origin feature as well.


Answering your question: no, asset streaming alone won’t help you in this, because the transform positions and calculations cause the issue. That’s why you need the floating origin feature.

1 Like

Did you implement “floating origin”?

Ahhh… i didnt and i dont know how :frowning:

Then why do you expect change? I don’t understand.

Have you did search for it and read what is it and how to implement it?

1 Like

Well, sir, i have spend 1 hour watching Kerbal Space Program@Unity 2013 video, but what they have done is a bit complicated for me because i got ZERO coding experience.

So… my goal is a HUGE open world(not space but flat earth) and the only problem(i hope so) is… floating point precision.
I have searched everywhere@Google for more information but didnt found so many clues about a solution to this and ended up opening this thread here for help.

Still searching for a floating origin implementation tutorial!

It has nothing to do with networking, so it does not handle networking.

???


Since you don’t have too much experience building and/or developing games, I think you should not work on an open world gigantic game. You will have a hard time to populate your world too.
So my advice is: start small, learn how to code, learn how to build a game and when you have a couple of friends/developers you can revisit your open world idea.
Obviously you don’t have to listen to my advice, but before you purchase any assets and start to build your game, think about it twice and please keep in mind that it is your job to evaluate every asset you purchase so talk to the developer, check what it can do before you throw your money at it.

2 Likes

I guarantee with a “HUGE open world” game this will not be your last major problem you encounter, and floating origin is a rather trivial thing to do a basic implementation. All you do is periodically take your player and move them to 0,0,0. Then on every other object in the game world subtract the same amount from the position of everything else as you did to the player. You could do it on a timer, or when the player has moved a certain distance from 0,0,0.

But you want to make this a network game too? Now that is a huge can of worms. I’m not aware of any networking solution which includes floating origin built in. I worked on some ideas on how I would get it to work a long time ago, and it basically involves reimplementing the transform and physics system on the server side to use double precision positions, you sync those to the clients and the client’s equivalent of NetworkTransform applies an offset to every networked object so the player stays near 0,0,0 even when they could be anywhere on the server side. That’s a gigantic amount of work. In the end in conjunction with other reasons I ended up going with a solution of chopping the game world up across multiple servers so when I would get too far from 0,0,0 I just get transferred to another server. But due to the scale and style of my game it is a lot more tolerant of getting far from 0,0,0 (start seeing visual issues around 100k out).

Thank you for your time answering my questions!
I lack of information about unity!

BUT… i’m still looking for a large enviroment singleplayer game, at least a build without shipping just for daily gaming session.
I simply have a fetish about that :(, please understand me :slight_smile: !