Announcement

Collapse
No announcement yet.

Unable to set velocity of actor on EventBeginPlay unless it has a 1+ second delay

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

    Unable to set velocity of actor on EventBeginPlay unless it has a 1+ second delay

    Trying to figure out a saving & loading system but seem unable to set the velocity of an actor without using a delay node (of 1 second or more). I'm not sure where the need for the delay is coming from. There's no apparent freeze-time at start and I can actually control the character from the off. I'm just unable to set the velocity until a second has passed.

    I'm saving the actor's velocity & transform on EventEndPlay to a save slot from within the character's BP class (2dSideScrollerCharacter).

    Click image for larger version

Name:	1.png
Views:	1
Size:	178.8 KB
ID:	1166589

    On EventBeginPlay (again within the char class), I set the actor's transform & velocity and it works perfectly with the delay. Without it the the transform goes into effect but the velocity doesn't.

    Click image for larger version

Name:	2.png
Views:	1
Size:	260.6 KB
ID:	1166590

    If I manually instigate the velocity (by pressing T) the character remains fixed in position but twitches, (almost like it's getting constantly reset until it's released).

    What am I missing?

    Thanks in advance.

    #2
    begin play is broken, it getting called before everything setup and running, stuff like player controller, HUD blueprint and any other bp, might not exist in the world on begin play from another bp.

    Comment


      #3
      Got it.

      Thanks CriErr

      Comment


        #4
        Originally posted by CriErr View Post
        begin play is broken, it getting called before everything setup and running, stuff like player controller, HUD blueprint and any other bp, might not exist in the world on begin play from another bp.
        Dang, i thought only Constructor Script suffers all that. I already made my own tick event (that ticks with game seconds instead of frames), now its time to create begin play dispatcher.

        Comment

        Working...
        X