Gazing and Blinking can e realized with the ''VHGazing'' component. It also implements blinking.
There are different methods to:
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.
*`void GazeToComponent(USceneComponent* GazeTargetComponent, FVector Offset = FVector::ZeroVector)`: same as above, but gazing towards a component.
*`void GazeToUser()`: Gaze at the head of the VR user, needs a AVirtualRealityPawn of the [RWTH VR Toolkit](https://devhub.vr.rwth-aachen.de/VR-Group/unreal-development/plugins/rwth-vr-toolkit) to be used.
*`void StopGazing()`: Look straight ahead again (or whatever is the default of the skeletal mesh / animation)
Additionally have .....
\ No newline at end of file
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.
Additionally have ``max rotation angles`` (for yaw and pitch of the parts) and the ``interpolation speeds`` (in degree / second) can be set.