Gazing and Blinking can e realized with the ''VHGazing'' component. It also implements blinking.
There are different methods for setting gaze targets:
-
GazeTo(FVector Target)
: gaze to a position given as world-space vector. -
GazeToActor(AActor* GazeTargetActor, FVector Offset = FVector::ZeroVector)
: gaze to an actor, potentially giving an offset in world-space to be used from that actor's location. -
GazeToComponent(USceneComponent* GazeTargetComponent, FVector Offset = FVector::ZeroVector)
: same as above, but gazing towards a component. -
GazeToUser()
: Gaze at the head of the VR user, needs a AVirtualRealityPawn of the RWTH VR Toolkit to be used. -
StopGazing()
: Look straight ahead again (or whatever is the default of the skeletal mesh / animation) -
SetSaccadeMode(ESaccadeMode NewSaccadeMode, bool bStartWithMutualGaze = true)
: Used to set the saccade modes which influences how the eyes perform saccades doing targeted gazes at the specified target (or forward if none) and avert the gaze a specified paterns, wherebStartWithMutualGaze
specifies whether the gaze should be directly averted when being called or stay on target (mutual) for the time a mutal saccade takes (which is randomized and different per saccade mode), modes are:-
Fixating
: just looking at target, not performing saccades -
Speaking
: saccades appropriate while speaking -
Listening
: saccades appropriate while listening (more fixation on target thanSpeaking
) -
Thinking
: saccades appropriate for thinking - Details about the specifics can be found in
SetupSaccadeData()
-
There are also some interesting parameters that could be set:
-
bool bEyeBlink
: whether the agent should randomly blink -
EGazeMode GazeMode
: whether to use just the eyes (EyesOnly
), head and eyes (EyesHead
) or additionally also the torso (EyesHeadTorso
). -
float HeadAlignment
/float TorsoAlignment
: Value between 0 and 1, to specify how much the head aligns towards the target. Alignment = 0: the head rotates only the minimal amount required for the eyes to gaze towards the target. Alignment = 1: the head is fully aligned towards the target and the eyes gaze straight ahead. -
bool bDoMicrosaccades
: whether to use small movements of the eye which humans normally do to focus etc. (see e.g. https://doi.org/10.1167%2F8.14.15) -
ESaccadeMode SaccadeMode
: sets the saccade mode which should be used at start, default is Fixation, so no saccades.
Additionally have max rotation angles
(for yaw and pitch of the parts) and the interpolation speeds
(in degree / second) can be set.