Jump to content

Collision doesn't work when i move a player sprite into a object sprite


thundahguy
 Share

Recommended Posts

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

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...