Announcement

Collapse
No announcement yet.

Event BeginPlay not working properly?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Event BeginPlay not working properly?

    I'm trying to get a point in World Space and convert it into Viewport space. I know how to do that.

    The issue comes when I try to do it on BeginPlay vs when I do it in Event Tick. Take a look at the 2 pictures below. Looks like if the Player Controller isn't loaded on begin play, but is on event tick. Judge yourselves:
    And the output is this:

    Click image for larger version

Name:	2.JPG
Views:	180
Size:	14.0 KB
ID:	1686664
    What might be the problem?

    #2
    UPDATE:
    Adding a Delay node of 0.01 seconds right after BeginPlay now seems to yield the correct value. It seems like if I needed to give UE4 a bit of time to "catch up" and read the correct value out of the "Project World Location To Widget Position" node.

    Even if this works, seems like a bit of an artificial solution. Is the Epic team aware of this issue? Maybe it's just me, that I don't understand very well how all this works behind the scenes?

    Comment


      #3
      You can't control which blueprints are going to fire BeginPlay first.
      I had a plugin that can do that, but I ended up killing it because there was talks about Epic about to add said functionality...

      Apparently it didn't go forward, I don't know why.

      https://forums.unrealengine.com/comm...xecution-order
      | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

      Comment


        #4
        Thanks Bruno. The images in your post are blurred out. Is the plugin being updated? Anyway, I managed to work a way around it by adding a delay node with a time sufficiently high, say 0.3 seconds (almost unnoticeable for players at the beginning of the game).

        Comment


          #5
          Originally posted by konig6 View Post
          Anyway, I managed to work a way around it by adding a delay node with a time sufficiently high, say 0.3 seconds (almost unnoticeable for players at the beginning of the game).
          Make sure you read this:

          https://docs.unrealengine.com/en-US/...low/index.html

          The most important bit - "However, there are differences between standalone and editor modes, both in terms of the exact order of some of the functions that are called, and in which functions are called. "


          This gent took it apart manually and got really close to nailing it.

          https://answers.unrealengine.com/que...order-for.html

          Comment


            #6
            Thank you for the heads up Everynone. I'll read more into this.

            Comment

            Working...
            X