I’m trying to create an endless runner like world generation but in 4 directions. I watched some tutorials but only one direction has worked every time.
I tried my own solution which is basically just spawning on a sphere when the character overlaps a box collision. This is working but the collision is not resetting, I cannot overlap the newly spawned one. I made a boolean which is true when overlapping and false when the overlap is ending. This is happening in the actor’s BP and the spawning in the lever BP.
All 4 directions should work, but a couple of things
Do it all in the blueprint
You have the problem, that when you spawn the new BP and step across into it, it will spawn on where you have just come from, so you have to deal with that
I tried doing it in the actor’s BP, and I got an infinite loop. I read that I cannot really spawn it from itself.
Also, I thought about it spawing to the same place but that is not true. Since I have 2 directions, If I go right and the new spawns, then if I go forward on the new one, another should spawn in front of the original where I started but nothing is happening. I checked it in the BP’s debug mode and the execution pins are not doing anyting with the spawned collision.
The bit of vector math ( btw ) is just so we can spawn the next BP on the correct axis, without having to figure out which box we collided with and all that…
I got a few questions during I tried to copy it:
1, How do you get all of the boxes in an array? I mean I can create the variable but I guess it will not reference the 4 boxes.
2, How did you get the SET target location node? I only has one with the target
3, What to do with “tile size” and “target location” variables? Do I just have to create or do I need to set something particular in those?
The only thing is, if I’m walking in a collision, and going over another one, it is not registering the other and not generates a new tile.
I tried to enlarge or make smaller the boxes, make these collide with each other, separate from each other but couldn’t find the perfect way
Soo, if I’m not making an array for the boxes, but doing something similar for each one, it could work? Or somehow is it possible that after making a new tile, that specific box’s collision get disabled?
Ah, okay. Then it seems I got the good idea at the start when I wanted to do it just couldn’t do anything after that That’s where I got the infinite loop
I think I will use your solution, because that is working, not like mine