I am quite stumped on this problem, because I thought this issue was supposed to be resolved with the introduction of Large World Coordinates, but for some reason it’s still applying a problem to my rotation:
Here’s the context - I am generating a voxel grid in the shape of a tetrahedron. I am using this to then produce multiple chunks to fit together into a larger world. I have the grid, it’s come together nicely and I have confirmed it is a perfect tetrahedron by vertex and distance value.
However, upon rotating the tetrahedron by 45 degrees, whether by the editor, by FRotator, by FQuat, or even FTransform, it is not allowing a perfect 45 degree rotation around the axis:
As you can see, the precision is off by a very small margin, however the green lines represent a difference in half a cm. Now obviously, this is an incredibly small value to be off by…however, the problem comes with scale. If I scale this up to the size I need (currently this measures at about 130m tall), by the time I increase the scale up to my planned size, the gap in this rotation will be quite significant, as large as 10, 100 or even 1000cm, which will cause havok in my process.
The reason for this is that eventually I need to stitch together my tetrahedrons to form the larger planet, but if the vertexes are off by a variable amount, it will be very difficult to have to measure the difference between each vertex at different points and then have to account for scale at the same time. It should be possible to just rotate this cleanly, but for some reason, the system will not let me.
I have tried numerous solutions to try and force a more precise rotation, such as FQuats, Matrixes, even just setting the values outright, but for some reason every time it comes to putting this tetrahedron in place, it’s always off. Here’s how my code currently implements this rotation:
Method 1 is the simple approach I started with, Method 2 is my latest implementation to try and force double precision, but to the same result.
Does anyone have some insight on how to solve this problem? Any input would be very helpful, as I have unfortunately run out of ideas.