Syncing Zoom with Camera Movement on a Spline?


My Camera has several knots (Vector3) to run through. I use a CATMULL_ROM_CURVE
for this. This works.

Now there is an array of camera Zoom values that should correspond to the Vector3 spline knots above / be reached at the same time as the Vector3 spline knots.

Shall I simply make up Vector4 knot out of Vector3 knot and zoom value and then apply the usual CATMULL_ROM_CURVE routine? Any better suggestions?

Thanks in advance.

If you want to slerp quaternions next I think you may be better off creating custom subclasses.

Vector4 might have confused you, but Vector4 is meant to be Vector4 here, not necessarily a quaternion.


Ah, no I was not confused by that. Maybe I should have elaborated a bit more.
I meant creating your own Knot class that holds:

Vector3 position_;
Quaternion rotation_;
float fov_;

In my special case camera orientation can be arbitrary as it is manually controlled by the user.
So I’d try the case

Vector4 vec4 = [ position_, zoom_];

You’re not planning any cut-scenes or other interruptions to the control?

My camera movement along a precalculated spline can be paused and then resumed.
No other interruptions are planned.

The Vector4 solution should work fine. I just think semantically it’s a bit iffy.