thundahguy

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

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.