Want to start an animation playing from a random frame so if 2 instances of same skeletal mesh in the scene, the anims will be out of sync. I can vary the play speed but giving the anim a Start Position inside the State Machine does not seem to work for example here the start position is set to .8. When the animation plays it’s not 80% or the way thru as I expected. Thanks
Yessssssss
Found this from a while ago, and it didn’t have an answer so here I am doing my part!
It looks like the start position needs to be between 0-1 and set when the animation is initialized.
So I set a variable on init
and I use that variable in the anim tree
looks to work just fine for me!
ok this does not work at all for me. I can manually set the Play Sequence player position to something other than the start but I cannot replicate your method.
my hacky solution here Start animation at random time
More on that. If you use a STATE machine in the Anim BluePrint then the method above stops working… so instead…
in the Character in the level give it an Anim Asset not an Anim BluePrint
and then in the Character BP in the Construction script override it like this …with an Override Animation Data node (there is no ‘Anim To Play’ node in the BP.
Setting the Start position here does nothing…
…so in the main BP Event Graph, do this - (my animation is 86 seconds long) -Set Position here, seems to wants seconds, so the In Pos is Random Float in Range 0 - 80
In the op example .8 is .8 seconds, not 80% of the animation like with an alpha value.
Great, thanks!
(- the problem I’m having to solve, is that I want the animation to play as a palindrome. On the reverse part I want it to keep going to the first frame, then swap direction and play forwards from the first frame.
This seems like a massive fiddle with state machines but with my Character BP method above it’s relatively simple to program.
Actually i figured it out - thanks for pointing out seconds
in the event graph
then in the State machine
(The start time gets set to a random, then after a short delay set back to 0)