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?

2 Likes

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

9 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.

7 Likes

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

2 Likes

Thanks for this! This opens up a whole new world for me. I was planning on making a game similar to static florr.io, but I couldn’t figure something out to make rotation until I saw this forum.

2 Likes

I was such a noob lol

Thank you for the help. I based this little game off of this idea, check it out if you have the time.

4 Likes
2 Likes

Updated version with world map

2 Likes

i have created legacy florr io with some things missing like spider queen ant web triple cactus and triple stingers if you want to look at my game it may be buggy because of mobs

2 Likes

Can you send the link? :eyes:

I have made florr io its fun