Tween in Needle Tools?

I am trying to achieve a camera transition between waypoints, anything good, except the camera jumping when changing the waypoint. I will attach a video. Maybe I could make it work with tween easier than clamp or slerp.

Original Post on Discord

by user 328144332622266369

Do you mean you want to transition to the new waypoint when you change it?

No, this is already done, but to make the camera not jump like this when changing the waypoints

by user 328144332622266369

You can add e.g. tween.js perhaps and use that? :thinking: Needle Engine Tweenjs Example - StackBlitz

But instead it shouldā€¦ ? :slightly_smiling_face:

Change the direction of the camera like a human i guess, I mean a normal person head will not rotate like this, lightspeed to the left or right :)))

by user 328144332622266369

Ah got it - I didnt even know it was a camera rotation :wink:

I installed the tween, but the import * as TWEEN from ā€˜@tweenjs/tween.jsā€™; doesnt work, the module couldnt be found. Sorry for not beeing specific about the rotation :frowning:

by user 328144332622266369

Well you dont have to use the library.

How do you currently update the camera? Would using one of the three.js slerp functions be enough perhaps?

You can just store the target rotation in a variable and then use myCamera.slerp(targetRotation, this.context.time.deltaTime/.2) or something like that?

Okay ,i will try that. Thank you very much.

by user 328144332622266369