So I'm making a visual novel and at the beginning and end of dialogue events the character-sprites and UI elements slide off screen with lerp functions. I'm having issues with the lerp function sometimes working perfectly and sometimes just moving the object partially the way. I've managed to fix it this far but this time I'm defeated. I have a number variable (dialogue_animation_end), if = 1, and if the objects are not in their position then lerp... Every other object has the same code and moves to their destination but not the dialogue bubble.
The weird thing is that when dialogue starts, I have basically the same code (dialogue_animation_start) and it moves correctly.
I have a few suspicions.
1. The UI elements are on their own layout with global layers, and because of that, the lerp function does not work the same as the character sprites that are on the played layout.
2. The Dialogue bubble moves along the Y axis, and therefore do not work the same.
I'm gonna be honest I don't think these things makes sense but it's all I got at this point.