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 aberbluebird

Hello, I currently have a player entity that I can move through a maze and then a goal entity which is transparent and placed over a ladder image in Weltmeister.

I need to be able to load level 2 when the player collides with the goal entity so some collision detection is needed. I am just wondering how this is done in ImpactJS as I am a newbie and have only just recently bought ImpactJS.

Really good and well worth the money by the way! Thanks.

1 decade ago by drhayes

Hey, check out the collideWith method on Entity: http://impactjs.com/documentation/class-reference/entity#collidewith

You can check the other parameter, see if its your player entity, and then loadLevelDeferred to get your next level.

Don&039;t forget to call #this.parent(other, axis) in your override.
Page 1 of 1
« first « previous next › last »