Is there any way to make a sprite orbit around another one?

Is there any way to make a sprite orbit around another one? im trying to have a boss fire an invisible projectile with 4 others orbiting around it in a circle. Is this possible without using the animation block?

1 Like

Maybe something like this?

You’d almost definitely want to smooth it out a bit – e.g. maybe make it so the on game update sets a ā€˜target angle’ on the sprite as sprite data, and another loop that goes over and moves them towards target angle, so that they don’t just ā€˜snap’ to the new locations, and also add some logic for when to add new ones into the pool / make it so they aim at the player, but I tried to keep it pretty simple as a starting point :slight_smile:

I’m using my jwunderl/arcade-sprite-util extension just to make the code a little simpler with ā€˜place at angle’ blocks / handle conversion from degrees to radians

5 Likes

Definitely! I don’t think i can show a concise solution… if you send the code I can try and add it myself!

holy hell, i fell like an idiot right now. thank you so much.

1 Like

wait, YOU made arcade sprite utils? your extension is the most useful one in my project.

1 Like

I’m so sorry… can you say this in simpler terms? Sorry…

1 Like