Setting mesh new relative location Z after changing capsule height

Solved. I needed to call the function outside the AnimNotify.