Hi,
I’ve been slogging through the engine source, trying to figure out how origin shifting is done. I think I get what it’s doing but it doesn’t make sense why. I’m hoping I missed something.
(Please note, when I say ‘object’, I mean a actor/component/etc with a location in the world.)
I thought the whole point of origin shifting was to make the object location smaller in magnitude so there was more room for precision. In the UE4 source, all I see is the origin shift being added to the location. That doesn’t seem right to me. You’ll be making the locations larger in magnitude and losing precision.
For example, with world tiling, the tile origin should be subtracted from the location of each of the objects that reside on that tile. Then their coordinates will all be relatively small and they will have the bits to handle small movements. When you need to translate coordinates between two objects on different tiles, you just have to subtract the tile A’s origin from tile B’s origin and then add that to the object B’s location. Then you have object B’s location relative to tile A’s origin (and in object A’s coordinate frame).
I would think that could get you much bigger worlds than you can get with the current implementation. And this is all before I even touch on how its been implemented for multiplayer. There’s an easy way to get much larger multiplayer worlds, too, if it was done a bit differently. In fact, you could have a multiplayer world just as big as you could get with a standalone game world.
But I have to consider I am missing something, so please, let’s discuss.
Thanks,