I have a simple Niagara scratch module math I can not figure out.
At Particle Spawn, I have two Skeletal Mesh Location that gave each particle an position attribute named “Start” and “Pose”.
And each Particle also added a attribute float called “Progress”, which is set to 0 here.
I want to use a bool to lerp between “Start” and “Pose”, and the motion is driven by a set speed.
So In my scratch model in Partcle Update, I created the following graph:
Basically, if the switch is set to TRUE, particle will lerp from “Start” to “Pose” at the set speed; If it’s FALSE, particle will lerp from “Pose” to “Start” at the set speed.
But that’s not what I got for result. when “Progress” is set to 0 at partcle spawn and the switch is TRUE, It will run the “Start to Pose” motion perfectly, but as soon as the switch turn FALSE, it jump back to the “Start” Position without lerping in between.
Inversely, if “Progress” is set to 1 at partcle spawn and the switch is FALSE, It will run the “Pose to Start” motion perfectly, but as soon as the switch turn TRUE, it jump back to the “Pose” Position without lerping in between.
I can not figure out what went wrong, shouldn’t this graph allowed me to add and subtract the progress bar by a set speed? why does it jump back to position and refused to go reverse?