Skip to content

Phaser Weapon plugin, set the kill_DISTANCE

I’m using the phaser weapon plugin, and i’ve set the kill type to kill_distance:

weapon.bulletKillType = Phaser.Weapon.KILL_DISTANCE;

But, it is automatically set to 2, which doesn’t really allow it to travel very far. I’m wondering how i can set it to a larger number

thanks in advance


You can just set the bulletKillDistance:

weapon.bulletKillType = Phaser.Weapon.KILL_DISTANCE;
weapon.bulletKillDistance = 50;

This strikes me as an oversight in the documentation.


This has been updated in the documentation source, and should be updated online once there’s a release/deployment.