Precision differences between procedural meshes made with SurfaceTool and ImmediateGeometry

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mbzdkc

Hi everybody,

I’m currently messing around with procedural road mesh generation in Godot and have noticed an odd thing. I’ve got most of my path generation code working fine, however when generating meshes with SurfaceTool, I’ve noticed that the vertices become more and more imprecise the farther away from (0,0,0) they get. In other words, what’s supposed to be a straight line becomes irregular.

However, when I use ImmediateGeometry, the mesh is nice and smooth as it should be.

What is going on there?