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 stevelaw

Why do you have to be a nuclear physicist to get checked working.

my missle object is checking against TYPE.BOTH - neither A or B is working, and player1 is set to type: ig.Entity.TYPE.A. I have no other properties set, and the instructions say type and checkedAgainst is all that is needed.

I am not using the level editor, this is a simple test project. Why can't I get this working? This is costing me time, and time is MONEY!

1 decade ago by Joncom

EntityPlayer = ig.Entity.extend({
    type: ig.Entity.TYPE.A
});

EntityMissile = ig.Entity.extend({
    checkAgainst: ig.Entity.TYPE.A,
    check: function(entity) {
        alert('Missile touched entity at ' + entity.pos.x + ',' + entity.pos.y);
    }
});

1 decade ago by lTyl

What collision mode are you using for each entity? LITE collides with ACTIVE or FIXED, and is the entity that 'moves'. FIXED collides with LITE, PASSIVE and ACTIVE. LITE or PASSIVE don't collide with other LITE or PASSIVE entities at all.

1 decade ago by stevelaw

Thanks Joncom,

I was using .position instead of .pos ... why this didn't crash is beyond me. if I use .polePosition, this crashes, but .position doesn't - wierd.

Thanks again
Page 1 of 1
« first « previous next › last »