Of course, this is possible, and there are several possible solutions:
However, Box2D is a little heavy if you only want to make some kind of custom encounter with the form.
- : ImpactJS - , , :
ig.Game.checkEntities, , .ig.Entity.check, , , , , ( ).
ig.Entity.check :
MyEntity = ig.Entity.extend({
customShape: 'circle',
customShapeProperties: {radius: 0},
check: function(other) {
if (...) {
this.customCheck(other);
}
},
customCheck: function(body) {}
});