Skip to content

IK Eye Blinker

eisclimber edited this page Jan 18, 2024 · 1 revision

IK Eye Blinker

class in ExPresSXR.Experimentation.EyeTracking
Component added via Component Menu

Description

Animates the blend shapes of a SkinnedMeshRenderer to make the eyes blink. One can either use the openness values from eye-tracking or random intervals.

The SkinnedMeshRenderer must have the proper blendshapes set up for this to work.
To get the blendshapes' index, find it in the editor. Right-click and Copy the 'Property Path'. Paste it somewhere and use the number in the short string as index.

Members

Editor Properties

  • InputActionReference _leftEyeOpennessRef: InputActionReference to the provider of the right eye's openness for the right eye. Should be a float.
  • InputActionReference _rightEyeOpennessRef: InputActionReference to the provider of the left eye's openness for the right eye. Should be a float.
  • int _leftBlinkIdx = -1: BlendShape index for the left eye's blink. Right-click on the BlendShape and copy it's property-path to get it's idx.
  • int _rightBlinkIdx = -1: BlendShape index for the right eye's blink. Right-click on the BlendShape and copy it's property-path to get it's idx.
  • float _blinkDuration = 0.5f: Duration of a blinking action in seconds.
  • float _minBlinkInterval = 5.0f: Minimum duration between blinks in seconds when blinkBehavior is set to RandomInterval.
  • float _maxBlinkInterval = 12.0f: Maximum duration between blinks in seconds when blinkBehavior is set to RandomInterval.
  • SkinnedMeshRenderer _meshRenderer: SkinnedMeshRenderer for which the BlendSpace Indices (and thus the morphing) are applied. Will be found automatically in the children if not provided.

Enums

  • BlinkBehavior: Determines with kind of blink behavior will be used.

ExPresS XR Wiki

Tutorial Pages

Code Documentation

Clone this wiki locally