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"

Lerp finishes before Timeline that is driving it does

I'm trying to create a "ping pong" effect with the player camera. Right now, it's just between two components I have specified in my Player BP. Eventually I want to add more points.

I have the "ping pong" effect working. But I have 2 problems:

  1. There are 4 timelines. However the two that are used to move the lerps while between the two position points play a lot faster than what is set in the timeline. I don't know why this is.

  2. With #1 in mind, another problem is that no matter where the camera is on the lerp path between position points, it's always a fixed time. For example, even if it's really close to a position point, it'll still take 0.5 seconds to get there. I was hoping to do something over time here so that it's always a consistent speed between points and not based on a set time. I can visually see the lerp finish in the game, but back in the Blueprint the timeline is still running. I have them all set to 0.5 seconds in length. Even tried 10 seconds, but it finishes early still (though a little slower)

Here's an image of what I have now. It could definitely be reduced, but this works pretty well now for isolating debug issues. I'm basically checking to see if the camera is at a start or end point, from there I'm ending all the other timelines that move it and enabling only the one I want. It spawns at Position 1. If the spacebar is pressed it starts moving towards Position 2. If released it moves back to Position 1. And it can be interrupted from there to go back and forth based on pressed/released.

alt text

Product Version: Not Selected
more ▼

asked Mar 30 '15 at 01:52 AM in Blueprint Scripting

avatar image

732 41 38 60

avatar image gmc Aug 03 '15 at 08:27 PM

I'm having this problem in 4.8.3 also This should probably be in Bug Reports also, since I think this is a bug (don't know how to move it. It will also be responded to a lot faster by the devs if in that category)

avatar image Adam Davis STAFF Oct 14 '15 at 08:58 PM

The timeline is playing from start, what happens if you have them play from play alone instead of play from start? Do you see a difference? Additionally, what is running this event? I'm trying to understand your setup so I can try to accurately reproduce this on my end but I'm a bit confused as to how you are running this and how to recreate the error you are seeing.

avatar image gmc Oct 14 '15 at 10:06 PM

Ok, I made a test project and created a bp with a SM_Template_Map_Floor mesh. I dragged off of the Begin Play Event and created a Timeline that is 5s long with a float starting at 0s to 5s going from 0 to 1. I connected the float to the Alpha of a float lerp going from 0 to 360. Off of the Update exec from the Timeline I connected a SetReletiveRotation for the mesh. I split the rot variable and connected the float lerp to the yaw.
I then simulated the scene and the object stops rotating but the Timeline has not finished. (stops at about 1s) This is 4.9.2 (dont know about 4.10) Also it is the same with Play and PlayFromStart

avatar image Adam Davis STAFF Oct 15 '15 at 01:57 PM

This sounds like you are hitting gimbal lock, does it look like the actor is still trying to move, for instance can you see any jittering when you rotate the object?

avatar image gmc Oct 15 '15 at 11:19 PM

I did not see any jittering, but just in case, I switched the SetRotation for 2 prints, one connected to the pin on the Timeline and another connected to a lerp vecter lerping: X0-200 Y0-400 Z0-600. Both the prints finished at the same time (first print printing 1 and second printing X200 Y400 Z600) but the timeline had not yet finished (it kept printing for about 4s, same as my above post) PrintResults Setup

lerp.jpg (50.8 kB)
setup.jpg (73.4 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

In the Timeline, are you setting the 'Length' correctly? By default it is set to 5 seconds.

You could also just use the checkbox 'Use Last Keyframe'.

more ▼

answered Oct 16 '15 at 03:43 PM

avatar image

41k 1009 183 494

avatar image gmc Oct 16 '15 at 08:23 PM

Wow, I feel stupid now, I had the timeline length correct, but the point was at 1s :0 Re-tryed everything and it all works.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
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