x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

alt text

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!

Product Version: UE 4.9
Tags:
whydelay.png (166.2 kB)
more ▼

asked Sep 02 '15 at 04:23 PM in Blueprint Scripting

avatar image

Rehket
61 2 3 3

avatar image erinacea Sep 02 '15 at 06:18 PM

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?

avatar image Rehket Sep 02 '15 at 08:59 PM

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

alt text

setcams.png (140.2 kB)
avatar image joessu Feb 27 '16 at 06:11 PM

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

avatar image mesterKG May 05 '16 at 05:39 PM

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.

--kg

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question