Moving Spike Block > 2D
Moving Spike Block
This demonstrates how to create a moving block with four spikes that move along with the block and cause damage when the moving spikes collide with the player rectangle. To complete this example you will need to download the tile sheet here. WASD keys move the player, SPACE key to create a new room, UP arrow key to change zoom and F1 key to turn on debug mode which will display rectangle outlines instead of images. View on Github