Oh... That is a terrible spawn...
Anyone have any input on the best strategy to avoid this?
So far, intense wiggling is ineffective. (wiggling the physbody for a few frames and check collision)
Sometimes the simplest solution is the best. Why not include the ship position as input to the function that generates asteroids, and simply not generate asteroids when it's within X distance from the ship spawn?
Maybe because I arbitrarily spawn the asteroids first :p
I didn't add a lot of detail, but conceptually, I think I have the right order.
My game involves multiple teams, each spawning new ships in during gameplay. When those ships spawn, the rest of the world already exists.
My solution of randomly jumping both 1. can get infinitely stuck 2. is jarring in a dense field of clutter
Do you have a "wave" physics entity yet? Something like the force from an explosion? If not, might as well add one for the future, and then you can use it to make the asteroids get away from a spot.
A wave would simply be an expanding circle where anything that intersects it would receive a force inversely proportional to the radius of the circle times the initial force.
A wave is a great idea!
I'm piggybacking on native SPHITSP, so a circle might not be possible... I'll give it a shot.
I wonder its time to start doing ARYOP...