I want to rotate the object slowly towards the clicked enemy.
I try the following code:
On right button clicked
Cursor is over the Enemy
Pick [b]player [/b]where player.selected=1
Every 0,1 seconds----->rotate 20*dt degrees towards (LastX,LastY)[/code:2t3958gt]
But the player rotates only once, is this can be done withot plugins.
Develop games in your browser. Powerful, performant & highly capable.
One way is to use a variable.
global number target= -1
on right clicked on enemy
--- set target to enemy.uid
Player.selected = 1
pick enemy by uid target
every 0.1 seconds
--- rotate 20*dt derees towards (enemy.x, enemy.y)[/code:1wh115d3]