Spawning three different actors randomly with no overlap.
FastlaneSuccess
Member Posts: 46
I have been trying to find a discussion for this, but it didn't touch on what I wanted
My plan:
Actor 1 (spawns obstacle 1)
Actor 2 (obstacle 2) - spawns actor 3 and 4 in relation to itself.
Spawn actor in relation to one another?? Not really random and it would be obvious how everything is in order. No overlap and not close to each other. This is endless runner where objects move towards the player. I tried to do a collide before, but the actors instead just sat on top of another pushing one actor down into the ground.
Comments
Your question is a little confusing (to me at least), do you want three actors to be spawned without them overlapping, is that your question ?
Yes, but randomly. My method that I am thinking of will avoid overlapping, but it wouldn't b random.
I also have a question on the random function. If I do random (4,10) seconds, does it choose any number for that game play only once. For example, gameplay 1, it choses the spawn every 6 seconds or is it a variety like 6 seconds now, then 10 seconds?
So, I made my objects spawn randomly and I added a collide to keep them from overlapping. But if they both spawn randomly at the same area, The obstacles sit on top of each other. I combatted this with a constrain attribute for position Y. But now when they collide, The obstacles rotate in a way while keeping their constrained Y attribute, but avoiding collision. The effect are side ways obstacles occasionally.
EDIT: Solved Everything