Static meshes in world return same value

Hey, i had a similar issue. What you can do is spawn a Blueprint with this timeline and this function each time the sphere overlap a Static Mesh and link this blueprint to this specific static mesh (by passing reference of static mesh).

Then when your Static mesh isn’t anymore in your SphereTrace you can do one of these :

  • Destroy the blueprint (will stop the timeline)

  • Play reverse timeline then destroy blueprint

  • Wait for the timeline to finish execute and then destroy the blueprint

(depend on how you want to handle this)

So you will have 1 BP for each Static Mesh, i’m not sure it’s very efficient but this should work. Try to never spawn 2 BP for the same Static Mesh with some branches.

I’ve got the current setup:

It’s inside of a function that is called from a timeline and is meant to get all instances of any static mesh with the tag “Morphable” and morph each of them over a time period. My problem is that the value of “MorphPercentage” is kept the same for each instance. I understand that this is caused because this variable is in the character bp and I’m giving it to each of the elements in the array. So I know what I’m doing wrong but… How to fix it?
I want each mesh to start at 0.0 and progress to 1.0 independently of the others. If the array’s elements were bps, I would’ve created a variable in it but they’re static meshes.

Thank you in advance for the help.

Hey! Thanks for the answer.
Could you please explain what you mean by “link the blueprint to the specific mesh”?