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 SnakePlissken

So coming across a problem in which I need to place a few entities in front of my main BackgroundMap. These entities have to use collision however just on themselves and not the map tiles in the background. Currently the Map tiles are causing me trouble and would like to be able to toggle them off and on.

My first thought would be to store the collisionMap data in an array then delete that tile data where the entities would go then replace it back when the entities went away.

So I have to ask is there another way to accomplish this process by layering collision maps or something to that extent. Thanks.

1 decade ago by Jerczu

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

This will make your entities completely ignore collision layer.

1 decade ago by SnakePlissken

Just so you know your answer was not correct and I found it somewhere else on the forums Basically your correct besides havign += instead of =

Looks like this.

        handleMovementTrace: function(res)
        {
            this.pos.x += this.vel.x * ig.system.tick;
            this.pos.y += this.vel.y * ig.system.tick;
        },
Page 1 of 1
« first « previous next › last »