VR-Vive -- Trigger AI animation by gaze


Is it possible to trigger AI character animations by using gaze triggers in VR?

I currently have an asset that triggers a fire if the player looks at it too long which uses simple triggers with gaze but a colleague said that it may be a bit more complex setting the same thing up for AI character animations.

For example - I have a scene which features AI characters which walk in a loop around the player and slowly walk closer. How would I make it so that when an AI character got closer to the player it would activate another animation such as ‘step back’ or ‘wave’ etc.

Is something like this possible at all?


You could do a linetrace from your players head in the direction he’s looking.
Whenever an AI characters is hit you trigger your animations.