Pointermove function

Hi there, I am trying to implement this phaser 2 code into phaser 3, any help would be appreciated:

turret.rotation = game.physics.arcade.angleToPointer(turret);

I basically want the turret to move as my mouse moves. I am finding it difficult to make it work at the moment.

Hi @Faizan_Ali,
Look at this example:
https://codepen.io/jjcapellan/full/bzVWWW

Hope it helps.
Regards.

1 Like