Add Ctrl to snap points to grid in Multi Blend editor
This commit is contained in:
@@ -1281,8 +1281,8 @@ namespace FlaxEngine
|
||||
/// <returns>The position snapped to the grid.</returns>
|
||||
public static Float2 SnapToGrid(Float2 pos, Float2 gridSize)
|
||||
{
|
||||
pos.X = Mathf.Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.Y) * gridSize.X;
|
||||
pos.Y = Mathf.Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.X) * gridSize.Y;
|
||||
pos.X = Mathf.Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.X) * gridSize.X;
|
||||
pos.Y = Mathf.Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.Y) * gridSize.Y;
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user