top of page

Event Based NPC Body Language System

Bringing NPC's to life - Event Based NPC Body Language System

Brief
My aim was to develop a system that changes the physical appearance of NPCs (non-Player Characters) in response to in-game events. Examples include altering facial expressions, blinking frequency, and more.

Details

  • The Event-Based NPC Body Language System is designed to be straight forward. It consists of three classes that interact to provide full functionality.

  • Lerping is used to make gradual changes to expressions and body language rather than instant snapping.

  • Values of 80 and 20 were chosen for testing, representing 100% and 20% of the blend shape influence, respectively, as the system clamps values between 0 and 5 (each increment representing 20%).

  • The system allows NPCs to show physical, behavioral, and attitudinal responses to in-game events.

     

  • Users can set values to change based on any desired event by creating a GameObject for the NPC and an instance of the EmotionalStateManager.

  • The function 'emotionalStateManager.TriggerSmoothEmotionChange(npc, EmotionalStateManager.EmotionType.mouthSmile, 4, 2.0f)' is used to apply changes to the NPC, specifying the emotion, intensity, and duration for the change.

Click the button to see documentation

bottom of page