Hey what’s up!
I am trying to do some fancy Camera work with scripts, and I am running into an issue where the same code is working a lot of the time, but is weirdly producing an inconsistent behavior, inconsistently…
Basically, I have a Camera that can be Panned, Zoomed, and Rotated by the player (this does not use Cinemachine). The Camera ‘looks at’ the the GameObject clicked by the player, and the player can then Pan the Camera after… Next, the player can do the rotation around the selection, and the Camera will ‘lerp’ back to the selection as a focal point, while still rotating as this occurs…
Or, most of the time this happens. However, there is a weird artifact where every so often the lerp will start way out of position and create a “jitter” for one instant, before reverting back to the proper lerping course…
This process is spread over multiple scripts, so I’m not sure how to efficiently share it all in this thread. Basically, it seems like the starting lerp position is set way out of position randomly for some reason. That, or there is something messed up in the script execution order.
Is it possible for a Lerp to accidentally have a negative iterator value? It that isn’t it, the best idea I have is that the data reference is getting corrupted for one frame for some reason.
Not sure what else to do here. Let me know how I can share more information to sort this out.