temp.angle = getangle(player.x - other.x, player.y - other.y); player.x += cos(temp.angle); player.y -= sin(temp.angle);