I’m trying to prototype a game where the player can shapeshift based on the absorbed powerup. How I do this is that when the player gets the coin, it changes the players mesh and anim instance; however, it only changes the mesh but the anim instance doesn’t work.
The 2 characters have different skeleton and meshes.
The image above is the Coin blueprint. When the player overlaps with the coin, it disappears and only changes the mesh. Am I close to being correct with this blueprint or am I way too far away from achieving what I want?
Is it too late to reply here? Anyway…sometimes a ‘Set Animation Mode’ node needs to be added before you use Set Anim Instance Class which actually tells the mesh to use an animation blueprint instead of a standard animation. That’s if you have not set the defaults in your new mesh. However there is a pitfall to this. If you set the default anim instance on that mesh and then later use this node again, it will create a second anim instance at real time, which may or may not work.
You can try it out. If it works, great! If not, well you have to change the way anim instance class is assigned and instantiated in code.
Change the mesh in the character and then “Set Animation Mode”, make sure the two are using the same animation BP, or you can change the Anim Instance like you are doing in the picture.
I struggle by myself for years with that. I found finally a workaround. If you set anim mode and anim class by the begin play event with a delay. It set it while runtime and it works. ^^
But this workaround only works when your skeletal mesh component is already added inside the blueprint. If you add it per AddSkeletalMeshComponent Node. It wont work sadly.
For this i only find a workaround to create a sepreate blueprint to set there the anim mode and class directly to the skeletal mesh component and add this blueprint with AddChildActorComponent node than in other blueprints.