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 mouseonew

I'm trying to spawn a fireball entity that I want to shoot in a certain direction ignoring all tile collisions. How would I go about doing this?

1 decade ago by StuartTresadern

just overide the handleMovementTrace in your entity:

handleMovementTrace: function( res ) {

    // Do not resolve the collision for this entity.

},

1 decade ago by mouseonew

Thanks, just what I was looking for. Here's what it looks like to keep the entity moving based on the velocity.


handleMovementTrace: function( res ) {
    this.pos.x += this.vel.x * ig.system.tick;
    this.pos.y += this.vel.y * ig.system.tick;
},

1 decade ago by StuartTresadern

as you do not need to resolve the collision just put the velocity code in your entities update.
Page 1 of 1
« first « previous next › last »