The AddBlock/Removeblock operaitons are automatically snapped to a grid.
What should i do to snap StampMesh to a grid? What i tried to do was i first did GetStampMeshHitInfo and then modified the position and called GetStampInfo to fix the position i modified with an actual stamp info but the results are not good and takes time to stabilize whenever i move the mouse.
The code is like this
ray = Camera.ScreenPointToRay(mousePosition);
var hitInfo = GetStampMeshHitInfo(ray);
hitInfo.position = Snapped(hitInfo.position);
hitInfo2 = GetStampMeshInfo(hitInfo);
The reulst is not good and whenever i move the mouse and a new ray is cast , the final position
moves for some time and then stabilizes at a position which doesn't feel right. What is a better way to do this and in general what exactly GetStampInfo does exactly different compared to GetStampMeshHitInfo ?