Hello all!
I have some kind of problem while I am trying to figure out this:
I have some coins that I want to spawn in my level. Like in the next illustration.
The blue squares represent obstacles which I need to avoid while spawning the coins in the level (Coins are represented by the yellow circles).
I add the coins by using “Add Child Component” node. Then I generate a random point in a “spawning area”. But sometimes the coins spawn inside an actor or in a way its colliding with it.
I want to avoid obstacles like shown in the illustration in a way, if it is an obstacle the coin will spawn next to the obstacle avoiding it.
I use following blueprint scheme to spawn coins: