Camera Jump after tween

Hey all,
First time poster. I’m wondering if anyone has a had a similar problem to me and can lend some input. I have a three,js map. It can be rotated around using a CatmullRomCurve3. On the map I have models that can be zoomed into by clicking on them. I have noticed that when i click on the screen while in zoomed in mode it will cause a problem. After I finish my tween zoomout the camera will jump to a random other position on the curve i set up as opposed to staying where i want it. If however I do no click on the window (excluding the back button) it will cause this jump. I spent all day trying to figure it out but I wasn’t able to. I would appreciate if anyone could lend some input.

I will paste my code for the animation part of my project. If anyone needs other details i’m happy to answer any questions. However I can’t really share all the code because work…

Thanks in advance for any and all input regardless of if it solves the problem or not. Ill lnk to my stackOverflow question as well since it has some code and more context for how the map is set up.
Stack Overflow Question

I saw your question on S.O. earlier today. Any way you could simplify your code to the essential tweens where the problem is taking place, and make a working example on ? It’s really hard for someone to want to read through that wall of code, especially if we can’t see what it’s doing.

From your description, it sounds like a “tween fighting” problem, where one tween manipulates properties towards one target, and a simultaneous tween manipulates properties towards another. But it’s really hard to tell without a minimal, complete, and verifiable example.

1 Like

That makes sense. Thanks for the advice I can’t right this second but i’ll get that example done tonight. Thanks for the response.

You were right it wasn’t exactly two tweens fighting but something else trying to move the camera simultaneously. Thanks for the thought. I for whatever reason didn’t even consider that. Gonna remove the SO question, but I appreciate the help.

1 Like