Trouble with collision

edited July 2013 in Support
Hi,

I have read and tried what was written on other threads about collision I but still can't get collision to work right. Do I need to place the .collision() inside the .registerCallback()? That's the only way I get collision with my player sprite and tilemaps, but only once, when my player sprite moves away It doesn't detec collision anymore.

Comments

  • .collision doesn't need to be inside of the registerCallback(), however the game will have to be started for it to work, further more it will only work on gQ's elements.

    I'm not sure I understand exactly what you mean by "when my player sprite moves away It doesn't detec collision anymore". If you mean that collision detection stops working after a movement just make sure you're moving your game elements with .x, .y or .xy instead of .css, otherwise collision detection will be broken.
Sign In or Register to comment.