Set Transition Time w. Float and not Switch

How can I use a float instead of a switch to set the duration of transition, with the same outcome?

Welcome to Unreal Forums!

When you create a new timeline, it will show up on variable list (you might need to expand the group) which gives you access to Set Play Rate.

If you set your timeline to be, for example 1s long, by default, you can then use simple math to achieve the transition speed you want or you could re-use your existing Enum.

0.5s = Play rate 2
1s = no change (default value)
2s = Play rate 0.5
5s = Play rate 0.2

You can pass over typed in value or use Enum for this, so your function would handle Set Play Rate “internally” using a switch, connected to single Timeline.

Note 1s default for Timeline length is just an example. I encourage you to experiment (FAFO).

Hope that helps!

If you have any other questions/problems, the community here has your back! Don’t be shy to ask.

1 Like