Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by yikidu

So I am using this script to keep the level centered on the player entity,
#
if (player.pos.y > ig.system.height / 2) {
this.screen.y = player.pos.y - ig.system.height / 2;
}

but I want the script to stop functioning when the player hits a trigger, basically allowing the player to fall off the screen when he collides with the trigger. I am using box2djs as well if that makes a difference. Any help would be appreciated.

1 decade ago by yikidu

So I'm a dummy, I fixed using player.pos.y to determine whether or not it had passed the threshold I had set.
Page 1 of 1
« first « previous next › last »