How do you mean follow you? It sounds like you want the asteroid to spin (so rotated frames) but it also sounds like you are dealing with trajectories. What is making the asteroid follow you? If you want the asteroid to move toward you while spinning, but when it passes you to stop, you can add something like this (it assumes asteroids are coming from above the player).
asteroid -> Create Actor -> Script Editor
- Code: Select all
directional_velocity=3;
asteroid -> Draw Actor -> Script Editor
- Code: Select all
if(y<player.y)
{
angle=direction(x, y, player.x, player.y);
}
If though you didn't want the asteroids to home on the player, than you can just put the angle code in the asteroids create actor. As for the rotation, from what you've given using an animation should work.