Provide activation and deactivation mechanism
- Last UpdatedDec 04, 2023
- 1 minute read
Animation, especially those including particle systems, usually requires huge calculation resources. As a result, you must manage the animations with care.
You should avoid running too many animations, especially those that are not currently visible.
Use activation and deactivation commands
You can provide an animation activation/deactivation command for each animation.
This command should:
-
Start/stop keyframe and geometry animations.
-
Start/stop particle systems. Use visible to freeze the particle system, reset to clear, enabled and emitterXX/Enabled to stop).
-
Start/stop sounds.
When the activation/deactivation command is ready, you can use it in many ways for projects and animations.
Here are some examples:
-
Link activation to item inspection so that the animation is frozen when the item is not inspected.
-
Allow only 1, 2, or 3 animations to be activated together. When a new one is activated, another one is deactivated.
-
Allow activation on position sensor basis. Only when camera or avatar is inside the position sensor, the animation is activated.