Table of Contents
There are two approaches to playing a 3D animation in our engine.
They both use TCastleScene
for playback,
start the animation by calling TCastleScene.PlayAnimation
or setting TCastleScene.AutoAnimation
.
This approach means that you load one model file, and the
TCastleScene
(actually, ancestor
TCastleSceneCore
)
will make the events work, sending/receiving events through routes,
activating sensors, running scripts etc. Among many things,
this means that world time will be passed to TimeSensor
nodes,
allowing you to animate by interpolator nodes.
You can also pass user input to TCastleSceneCore
methods like TCastleSceneCore.KeyDown
,
and then the user will be able to fully interact with the VRML scene.
This is what should be used for presenting interactive X3D / VRML world to the user, as envisioned by X3D / VRML specifications.