Why do I need to use a delay to get my actor and cameras to reference correctly?

I am trying to figure out why I need to include the delay nodes in the blueprint below. The level is a modified version of the Top Down Template and has 4 cameras placed in the level that are supposed to watch the character as it moves around the level like security cameras. I have also removed the camera from the top down character. With the Delay Nodes included as they are below, the code works how I want it to.

The loop sets my character, which is spawned in the same way as the regular top down character, as the target of the 4 cameras in the level. If the Delay Node is not present, the target is set to the origin. What is the delay doing that is making this work?

After the loop, the view target switches to the first camera. Without the Delay Node present, the get function returns “none” when debugging and the Set View Target Does not work correctly. What is the delay doing that causes the code to work?

I am thinking that it has something to do with the order that the game objects are being initialized, but I do not know how to confirm that.

Thanks in advanced for your assistance!

With a delay of 0, this is almost certainly a ticking issue. For some reason, your camera array only appears to contain valid (or any) entries after your PlayerController’s first tick.

How/when does the camera array get filled?

The array is set up in the level blueprint and it executes from the On Begin Play event.

I have the same issue!!! a delay of 0 allows me to rotate the camera on my pawn!

If this is related to the player controller as a previous post hinted at, you could use the OnPossessed event of the character instead of the begin play.


i have the same issue with local multiplayer shared camera