Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/229443599786442752
added 11 characters in body; edited title
Source Link
user1430
user1430

Snapping How can I snap a blockgame object's position to a grid?

I'm making a game that involves falling-block"falling block" gameplay elements. TheThe problem is, I'm not quite sure how to make it so that the blocks will snap to some kind of grid, i.e.in other words, I'm not sure how it will pick the closest cell to its position. The

The blocks are not continuously snapping to a grid (i.e. they are subject to gravity).

  Any tips?

Snapping a block to a grid?

I'm making a game that involves falling-block gameplay elements. The problem is, I'm not quite sure how to make it so that the blocks will snap to some kind of grid, i.e. I'm not sure how it will pick the closest cell to its position. The blocks are not continuously snapping to a grid (i.e. they are subject to gravity).

  Any tips?

How can I snap a game object's position to a grid?

I'm making a game that involves "falling block" gameplay elements. The problem is, I'm not quite sure how to make it so that the blocks will snap to some kind of grid, in other words, I'm not sure how it will pick the closest cell to its position.

The blocks are not continuously snapping to a grid (i.e. they are subject to gravity). Any tips?

Source Link
JesseTG
  • 1.1k
  • 3
  • 13
  • 28

Snapping a block to a grid?

I'm making a game that involves falling-block gameplay elements. The problem is, I'm not quite sure how to make it so that the blocks will snap to some kind of grid, i.e. I'm not sure how it will pick the closest cell to its position. The blocks are not continuously snapping to a grid (i.e. they are subject to gravity).

Any tips?