vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::AnimationEvent Struct Reference

A rig's playback head crossed one of its clip's markers this tick. More...

#include <animation_events.h>

Public Attributes

EntityId entity
 The entity carrying the Animator.
std::string marker
 The crossed ClipMarker's name.

Detailed Description

A rig's playback head crossed one of its clip's markers this tick.

Enqueued on the EventBus by SkeletalAnimationSystem; a Behavior subscribes:

subscribe<AnimationEvent>([this](const AnimationEvent& e) { if (e.entity == m_player && e.marker == "footstep") playFootstep(); });

Once per crossing, either direction, and only for the clip the Animator is playing, so a crossfade cannot double a footstep.


The documentation for this struct was generated from the following file: