Jump to content

Need some suggestion!


YuShaN
 Share

Recommended Posts

Hi everyone. I'm working a shooting game. I have a player shoot some bullets and a group enemy spam base on time. I try use method game.physics.arcade.moveToObject(player, enemy, 800); in method update of bullet for auto chase enemy. But it don't working (bullet auto chase for first enemy then stop working). Someone can give me a suggestion for it. Thank you!

Link to comment
Share on other sites

Hard to tell without more code. Can you make a basic jsfiddle or phaser sandbox?

Do you mean it only chases the first enemy ? Also you're calling it on the player not the bullet

take note of this from the docs....

"Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course"

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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