Answers for "make object move towards player p5js"

0

make object move towards player p5js

this.rotation = atan2(player.y - this.y, player.x - this.y);
this.speed = 2.5;

this.x += cos(this.rotation) * this.speed;
this.y += sin(this.rotation) * this.speed;
Posted by: Guest on April-17-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language