Camera Animation

Finally got round to creating a Camera Animation component.
Everything is easy except for achieving constant velocity, my solution is to scale the delta time by the rate of change of the curve:

S = float3(sx, sy, sz) // and sx etc. refer to the slope of the cubic curve for that axis
DeltaTime = TimeFactor / Length(S);

For orientation constant velocity is irrelevant, but smooth velocity changes are important, so:
Quaternion.Slerp(q1, q2, SmoothStep(ip))


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: