Skip to content
Advertisement

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

Advertisement

Answer

You can just set the bulletKillDistance:

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

This strikes me as an oversight in the documentation.

Update

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

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement