Download

Timelines and Blueprints - Set Playback Position

Hey everybody,

I have a question regarding blueprints and timelines:

I have a setup of cubes that move up & down in a loop, all cubes are spawns of the same single-cube-blueprint.
In each cube-BP there is a timeline that moves the cube up/down and loops when finished.

Then, I am setting a delay between the clones of the cubes so they don’t move at the same time.
I do that by using set-playback-position and calculating the delay by the amount of cubes.

If I just set the playback position, they all just jump to that timepoint and I don’t want that.
So I use another timeline that moves the 1st timeline’s playback position from “current position” till the target position.
This way the all move smoothly to the delayed position.

So far so good.

My problem is, then the motion isn’t fluid, since they all ease to the delayed position and only when the 2nd timeline is over, they keep on moving.

Looks like this (sorry for the terrible quality) Dropbox - non smooth animation.mp4 - Simplify your life

Is there a way to overcome this?
So they will slide into the delayed position but won’t stop moving, rather just roll into it while still moving?

Thanks in advance!

Elad.

I haven’t looked at this too closely, but, golden rule with timelines is: always lerp between two fixed points.

GetPlaybackPosition will vary.

Try reading it before going into the TL.

Also, if you want them to vary, why not just put a delay before the timeline? ( I could have missed a crucial point there… ).

The position animation does happen with lerp. The position timeline goes from 0-1-0 over 2 seconds.
All cubes move with the same timeline, I just offset their position with changing the playback position with a 2nd timeline (that goes from 0-1 over 1 second)

It’s a dynamic rig, so all the cubes can stay still at position 0, start moving equally (which means no delay) or move with a random variation (which means a different playback position for each cube)

I need all cubes to start moving at the same time (so I can’t activate the timeline one by one with a delay node).

Hope I’m making sense :smiley:

Hey! ( sorry didn’t register it was you :slight_smile: )

Why not do it by changing the timeline play speed?

EDIT: The problem with the current setup, is you’re trying to move the playback position, while the other TL is trying to move it, which will lead to jumps.

Oh hey :)))
Always happy to be in touch !

There is no jump in the animation, more like a pause.
Meaning the 1st timeline which moves up/down is waiting for the 2nd timeline (which offsets the playback position) to end, before it can keep on playing.
You can see it in the dropbox video I added.

If I change the play speed it would mean each cube will move at a different speed, but I do wish they’ll stay at constant speed, just with an offset.

Where is the code that controls these two graphs? ( I tried to set this up, but can’t )

Is the first TL always running when you try and change the playback position?

More importantly, what effect are you trying to achieve?

The effect I’m after:
I have this series of cubes, and they can stay still or move.
And when they move, they can be offset either by single-location, by row, by column, or randomly.

so I do that with those 2 timelines.
1 moves them constantly, the one offsets the 1st timeline’s position according to some calculation based on the cube ID.

That’s how I figured to have the cubes move at once, while being able to shift their position.

It works great minus that part where the 1st timeline holds, until the offset-timeline finishes. (which makes sense… I’m just looking for a way to overcome that)

Here is a better video that shows the different modes working:

I have each blueprint with a bind to several events, each event (e.g Random mode)
calls this this code:


Which offsets each blueprint’s position-timeline to a random position using this code:

Basically I need something like “add to playback position” rather than “set playback position” but it doesn’t exist. That way it’ll just slide across the timeline without holding at the end.

In your working vid, as far as I can see, the cubes just have a different target height.

Why not just change the target height based on cube position ( ID )?

I don’t think you’ll get this 2 TL thing working, because they are fighting each other.

Sorry if I’m being thick…

They all reach the same height though, maybe it looks like different height but it’s the same target height.

The alternative atm is to just set the playback position without a timeline, so it will create a jump but no hold…

Now I’m totally lost, because I see cubes at different heights…

Voom! ( sound of the concept going over my head )

Haha ■■■■, sorry for confusing.
All cubes move from 0-800 on the axis.

The main timeline is offset in relation to the cubeID so they are not at the same height at any given point when I offset them.

So I still want each cube to move between 0-800, but with a delay between each cube.

Ok, so they all move the same amount, but are supposed to be in earlier / later parts of that movement cycle… :relaxed:

And you want to adjust their relative position in the cycle without a sudden change.

1 Like

The only thing I can think of, is to calculate the current position once, here:

because at least then, you’re not breaking the TL gospel :wink:

I think maybe, that weird shift you’re getting is because the first part of the lerp isn’t staying put…

Yeah exactly! I don’t mind the sudden change, more like the pause at the end of it (cause of the collision of the 2 TL there is around 1sec pause before they all keep on moving)

Your idea helped a lot !

Doing it like that reduced the delay!! thank you :)) !! as always

1 Like

Hoorah! :rofl:

1 Like