Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int gridCubeWidth = 16, gridCubeHeight = 16;
- cube.Position.X = Math.Floor(cube.Position.X / gridCubeWidth) * gridCubeWidth;
- cube.Position.Y = Math.Floor(cube.Position.Y / gridCubeHeight) * gridCubeHeight;
Add Comment
Please, Sign In to add comment