Announcement

Collapse
No announcement yet.

Questions about Timeline Blueprint, how to control animation with input

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

    Questions about Timeline Blueprint, how to control animation with input

    Hello everyone,

    I've got a project where there's a Menu composed with several screens. I want all the screens to be in the same world and navigate from one screen to another. I would like the camera to fly, not to teleport.

    Click image for larger version

Name:	emptyActor.png
Views:	1
Size:	250.3 KB
ID:	1209295

    In order to achieve this I put empty actors in the world to define position and rotation of the camera.

    Then I use the Timeline node to animate the camera position from one point to another.

    Click image for larger version

Name:	cam_bp.png
Views:	1
Size:	225.4 KB
ID:	1209296

    It's Ok to go from point A to point B, but I don't know to go from point B to point C, from point C to point D, etc.

    I tried to add another timeline node to go from point B to point C but I get several issues. When I'm at point C and hit the reverse button, the animation start at point B and not rversing. I can't go back to point A. Whan the animation from B to C began there's a little flickering.

    Click image for larger version

Name:	cam_bp_2.png
Views:	1
Size:	373.2 KB
ID:	1209297

    Maybe I didn't do things right. I'm a newbie visual scripter (and not a scripter at all), I'm more on the artist side of the force. That's why a little help would be very welcome

    What I really want to achieve is When I press P It play animation, camera goes from A to B then pause, when I press P again, it goes from B to C, etc and when I press R it can reverse from C to B, then from B to A.

    #2
    Is using for each loop the solution? I don't really know where to place it :/

    Since last week I just created an initial cam position variable to store the initial position of the camera:
    Click image for larger version

Name:	cam_bp_3.png
Views:	1
Size:	336.4 KB
ID:	1123213

    Comment


      #3
      There are many ways to achieve it:
      • use SetViewTargetWithBlend
      • have a bunch of transforms and lerp between them
      • set up a closed spline and slide the camera along it

      Your method is not bad at all. Put a number of desired coordinates in an array, pressing P/R will get the next/previous entry in the array and set it as a target for the camera move.

      Comment


        #4
        I think you are overcomplicating it. Use a variable transform that you call "Goal" and another that you call "Start", so that when you change camera, you set start as your current position and goal as the new camera, and then you just lerp between the transforms every tick. Whenever you want to change camera, you just change Goal and Start and reset your lerp value and it'll make it automatically. This allows for much more flexibility.

        Comment


          #5
          As suggested SetViewTargetWithBlend would be the easiest to do.
          But you do give up control over the exact path the camera will track...

          Comment

          Working...
          X