Mood and Non-Verbal
The mood system controls how agents express emotion and non-verbal behaviour during conversations.
Mood states drive long lived animation changes, and can influence automatic camera shot selection.
How mood works
MoodService manages the current mood state for each agent in a conversation. When a mood beat is encountered during playback, the service updates the agent's mood, which triggers downstream presentation changes.
Mood data
Mood states are defined as entries in a mood repository configured through module settings. Each mood entry consists of:
- ID -- a string identifier (e.g. "angry", "happy", "neutral")
- Idle animation -- an
AnimationClipthat plays as the agent's idle when this mood is active
You can add custom moods to the repository to match your narrative needs. Create a mood repository asset at Assets > Create > BardTreeLtd/Dialogue/Non Verbal/Mood and assign it in module settings.
Mood events
MoodEventingService fires events when mood changes occur. External systems can subscribe to these events to trigger additional effects -- for example, changing ambient lighting or adjusting background music during tense conversations.
Non-verbal eventing
NonVerbalEventingService handles broader non-verbal signals beyond mood. This includes things like gesture triggers and posture shifts that accompany dialogue but are not directly tied to a mood state.
Lip sync
The dialogue system supports lip sync through pluggable providers, shipped for uLipSync (blend shape or jaw bone) and OVRLipSync.
When an audio beat plays, the presentation service starts lip sync on the speaking agent and stops it when the audio ends. The provider is found on the agent itself rather than registered in module settings, so you can swap implementations per character without changing dialogue content.
Lip sync needs a third party package installed before any of it does anything -- see Lip Sync for installation and per agent setup.
Mood and camera
Mood states can influence automatic camera shot selection through the MoodDrivenShotRule. A DefaultMoodCameraHintResolver maps moods to shot preferences. For example, an angry mood might prefer close-ups to emphasise intensity, while a neutral mood might use medium framing.
See Camera Shot Rules for details.
Practical advice
Mood beats are most effective when used sparingly at key emotional shifts. A conversation that changes mood every line feels chaotic. Let the mood settle, and change it when the tone genuinely shifts.
Start with neutral and one or two contrasting moods. Expand the mood repository as your narrative complexity grows.
Reference
Next step
Continue to UI and Theming.