GridAlignment.Snap

Method in GridAlignment

Declaration

public Vector3 Snap(Vector3 vector, float increment)

Description

Snaps a vector to the grid at a given increment.

Parameters

vectorThe vector to snap.
incrementThe amount of units the vector is rounded to.

Returns

Vector3The vector snapped to the grid.