I have a simple animation exported from Maya where some meshes move around using keyframes.
What I want to do is set up a Lerp in Blueprint so I can freely adjust the position/frame of the animation ingame. Maybe by pulling a lever that plays the animation from start to end or wherever you hold the lever in between. Important is that you can reverse it halfway. I’ve tried a bunch of stuff, but can’t get this to work properly, how do I set this up?
You could try using a statemachine in an Animation blueprint.
Have a boolean variable for the lever input.
In the state machine have 2 states for ‘open’ and ‘closed’ or something like that and make them just play the animations. (Make sure to disable looping if you want them to just play once.)
Now in the connections between the state, just drag the boolean in there and connect it. And for the opposite connection, have the same boolean with a ‘NOT’ node.
The connections between the states will take care of the blending/lerp. So if the lever is doing an ‘open’ animation and you quickly set the boolean to false it should go back to its original position.
You’d have to set the boolean inside of its blueprint on an event.
Let me know if this makes sense.