title: Move an object in a direction
body: <p>I have to work in Game Maker for this project and I want to move a object towards another object. This is what I have got so far. Does anyone know what I am doing wrong? The enemy is now spinning around the player.</p>
  
  <pre><code>draw_sprite(sprite_index,image_index,x,y);
  moveSpeed = 1;
  angle = arctan2(enemy_obj.x - player_obj.x, enemy_obj.y - player_obj.y);
  enemy_obj.x += cos(angle) * moveSpeed;
  enemy_obj.y -= sin(angle) * moveSpeed;
  </code></pre>