Guest User

Untitled

a guest
Jun 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. int gridCubeWidth = 16, gridCubeHeight = 16;
  2.  
  3. cube.Position.X = Math.Floor(cube.Position.X / gridCubeWidth) * gridCubeWidth;
  4. cube.Position.Y = Math.Floor(cube.Position.Y / gridCubeHeight) * gridCubeHeight;
Add Comment
Please, Sign In to add comment