Is this a floating point error related to distance from origin?

If you word shift, you want to keep it around every 250 meters.
How you do it is you keep the location of the last “position check” in a variable, then use a distance node between where you are and where you were.
If > 250m you call the shift.

That said. Converting to integers via Truncate as you did is probably enough to remove errors anyway?

Have you tested this method on the compass movement without the shift?

And to be a little more precise, I would only use the Truncate on the line trace. No need to cut the position itself since no math will be done on the float points.

But if it does not work, you can also Truncate the rest.

1 Like

Ah I think I follow now. I had to go see exactly what truncate means. Once I do I’ll let you know how it went.

I’ll test this out as well, doesn’t hurt to know if it’s also going to be another viable solution. For now I just do the origin shift whenever the player goes into the “tool mode,” because that is the only time where the jittering actually matters.

1 Like