As the title suggests. I want to switch out the default implementations using floats for doubles to aid precision and accuracy over longer distances.
I have considered these other approaches:
- Keep the main camera and primary object stationary at Origin and have everything else move around. However, I think that would both be messy and less performant.
- Break up the scene in parts and move the active part, alongside the player to the origin. This is my current preferred approach as it could be much cleaner and will only really affect performance for the single frame where the transfer occurs while maintaining accuracy over a acceptably precise limit. It still would relatively be a pain to maintain and will doubtlessly cause countless bugs as the development progresses.
Thus I consider replacing floats with doubles to be the optimal approach as it would almost square the distance I can accurately calculate for any given precision limit.
On first glance, I don’t think it is directly possible to do(I may be wrong) so and my only bet would be to create a layer where all computations are performed on doubles and Unity is passed a float value cast from this layer to render the frame. This would guarantee consistent computations but the actual viewed result may not be similarly consistent, besides being more memory intensive. So, I actually prefer this less than the second consideration listed above.
I thought I could post this here in case anybody has a better idea or a way to achieved the desired effect.
Any effort is deeply appreciated.