thundahguy Posted July 30, 2017 Report Share Posted July 30, 2017 I have added a spikes sprite and i'm trying to get collision working spikes = game.add.group(); spikes.enabledBody = true; var spike = spikes.create(150, game.world.height - 110, 'spikes'); spikes.body.immovable = true; and in update function game.physics.arcade.collide(player, spikes) the problem is, that the player sprite goes right trough the spikes Quote Link to comment Share on other sites More sharing options...
samid737 Posted July 30, 2017 Report Share Posted July 30, 2017 spikes.enableBody = true; or you can use game.add.physicsGroup(); instead. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.