I am working on a collectables system of small figurines.
They consist mainly of a character(skeletal mesh) inside a BP.
I have made a struct of the information that feeds into what the BP.
The idea is that we set the values inside a data table and never need to touch the BP itself or make child BPs for every type of collectable.
My thought was to have the skeletal mesh be set to animation and have a offset variable included in the struct of information. Like in the default version the character is doing a wave. The mesh is set to override animation asset in the construction script and not to play. The character is frozen at the offset time within the animation.
When someone picks up or activates the collectable the animation should play from the start and return to the frozen position of the offset.
I thought that would be easy but it does not work as expected. What I do when firing the interaction:
- Play animation asset.
- Wait the length of the animation.
- Override the animation asset. Plugin in the offset.
The thing that happens is that the animation plays until the end and then it stops there. The Override does not trigger. Or at least does nothing.
The only way I could make it work was by changing the mesh into another mesh and then doing the override.
Does anyone know why this isn’t working or know of a better workflow without to much clutter?