Stop actors from colliding on spawn?

Hey all! Trying to spawn actors randomly inside a radius around another actor.

It all seems to work except occasionally the actors will spawn inside each other. Messing with the collision handling override produces… Interesting results. Anything that controls a no spawn if colliding makes ALL of them not spawn regardless if they were colliding.

As it currently stands they spawn within the area correctly and randomly except they overlap sometimes.

Any help appreciated.

Not going to leave an answer this time round, just this single comment instead. The trace values are set up incorrectly, as discussed in the other thread. Good luck.


Why even use sphere trace if you’re not letting it do its thing and move it by -1uu only?

First thing I did was try to modify that bit of code and then look at the thread.

After some messing about I found out that the random point in reachable radius node is the problem, if I set it up with a random point in bounding box it works fine. Which I guess at the end of the day, it works the exact same either way for my purposes. But being a curious ■■■■ I’m still messing with that node trying to find out why.

for me both nodes occasionally give a point which collides. the problem is with the spawn actor. i didn’t actually check the coordinates but its one of the two things:

1-) Either it is the spawn actor node. (i hate the collision handling override since it never seems to work for me.). i think either the spawn actor node’s collision handling override messes the spawning up by spawning multiple actors at the same location sometimes.

2-) or its just the random reachable location in radius / random point in bounding box. which i think is the problem since the output is random it can sometimes give you the same point due to seeding issues.(RNG seeding stuff. im not sure if it is the case but im just putting what i think)

Thing thing really made me angry since i was trying to create a ai evolution where ai eat food, replicate and die if hungry and get different genes according to the current conditions when replicating to keep the generation afloat. My ai characters just seemed to spawn on top of many of the food and that led to them instantly eating the food half the food spawned as soon as the game started.

I found using get a random point in bounding box produces the best results.