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 Bushstar

In my game...

http://project.dnsalias.com/

Whenever you shoot at a sloped wall that is collision mapped the bullet does not disappear like when it hits vertical or horizontal walls. If you shoot perpendicular at the sloped wall the bullets just gather up there.

This is the collision code from my bullet entity.

handleMovementTrace: function( res ) {
		    this.parent( res );
		    if( res.collision.x || res.collision.y ){
		        this.kill();
		    }
		},

Any thoughts on where the problem lies?

1 decade ago by Aitor

The slope collision info is stored in res.collision.slope, which is false If there was no slope collision, or an object containing the slope direction and it's normal.
http://impactjs.com/documentation/class-reference/collisionmap#trace

1 decade ago by Bushstar

Perfect. I'll have to make the class reference my bed time reading material.
Page 1 of 1
« first « previous next › last »