Jump to content

Using arcade distanceBetween


D3thy
 Share

Recommended Posts

I'm trying to use game.physics.arcade.distanceBetween(player, robots); to test the distance between my player and the enemy robots, if within a specific range then have the enemy shoot at the player.

 

I have a function for the enemy to fire, i'm just not sure how to set up the code that uses distance between to check the range, and then run the enemyFire function.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...