Play animation but preserve style settings?

Messing with scenes is the hard way and when you animate between camera positions the path is a direct line between the eye positions. This causes camera surging toward and away from the target.

Instead of scenes, use the API’s abstract Animation class.

Then your choice is to rotate the camera around the target or rotate the target itself whilst the camera is stationary. (The latter will cause the model’s modified flag to be set true.)

The following example shows how to set up a rotational transformation and apply it to the camera:

You could just as easily apply the transform to the model object (but again, this modifies the model, which may require you to call Sketchup.undo afterward.)

1 Like