Spawning a new actor of the same class infinite loop Solved! But i have another problem with collision of pawn

I’m trying to create a form of endless runner test from the roller project. I have some problem with “Infinite Loop detected in blueprint: Cube”

You can see in the picture that I’m trying to spawn a new cubes section whenever you roll under one cube section. There is a box trigger in the passageway. It works when I’m only spawning the explosion but the spawn actor event get this error.

Thankful for any answers.

1 Like

Hi KristofferF,

Which version of the editor are you using?

Hi I tried 4.5.1 and 4.6.1

Okay, I see what you are doing now. Getting an infinite loop in this situation is correct, you can’t spawn a blueprint with itself. You will need to create a separate blueprint (or use the level blueprint) to spawn other instances of the Cube blueprint.

Cheers,

TJ

Ok thanks i will try that. Why does it become a loop? A new cube that is being spawned shouldn’t set of its own box trigger right?

It works now. My floor spawns a trigger volume that spawns a new floor when triggered and so on.

Now I have another problem. Why doesn’t my ball which is a pawn get noticed by the trigger volume. I use custom collisions but I have to use physics body as overlap. Pawn doesn’t work. It doesn’t get triggered.

Why?

By default, the setting for the PhysicsBallBP collision is PhysicsActor. You will need to make sure that the Collision Preset of the PhysicsBallBP and the blueprint Trigger volume will interact.

Try one of these settings:

PhysicsBallBP = PhysicsActor & Trigger = OverlapAllDynamic

or

PhysicsBallBP = Pawn & Trigger = OverlapOnlyPawn

Hi I don’t understand how you mean i should implement this. Is it C++ code?
Just doing Blueprint now. Or where in blueprint do i set these settings?

I solved it by doing Cast to PhysicasBallBP from OnComponentBeginOverlap like this pictures show! But I still what to know how you meant I should solve it?

Sorry about that. It’s the settings contained inside of the PhysicsBallBP character and Cube blueprint components.

  • Inside of the PhysicsBallBP set the '[ROOT]Ball component Collision Preset to ‘PhysicsActor’.

  • Inside of the Cube blueprint, set the Trigger components Collision Preset to ‘OverlapAllDynamic’

or

  • Inside of the PhysicsBallBP set the '[ROOT]Ball component Collision Preset to ‘Pawn’.

  • Inside of the Cube blueprint, set the Trigger components Collision Preset to ‘OverlapOnlyPawn’

Ok perfect. Thanks for the help.

I use OverlapOnlyPawn under collision presets for my box collider. I hope this helps. Cheers

Thanks! This fixed it for me!!! I never would have figured this out!!!