SNPC Eyes

I have an SNPC who’s eyes I want to look at a player.

The SNPC is using the TASK_FACE_PLAYER task to face towards the player, but it’s head and eyes are constantly looking in one direction (slightly to the left).

Does anyone know how to rectify this?

Actually, I’ve found it constantly looks at Local Position 0,0,0 (It’s feet). I think it needs a target to look at, but [lua]self:SetEyeTarget(self.Entity:LocalToWorld(Vector(0, 80, 80)))[/lua] doesn’t seem to do anything.

You have to add the capability CAP_ANIMATEDFACE to your SNPC.
This will make him use his eyes just like the vanilla NPCs do, but I don’t think you can make him focus on something specific without creating a choreographed scene.

The CAP_ANIMATEDFACE is in there, but it’s eyes just stick looking at one position, not even looking around randomly like the default ones do.

Is it a custom model?
If yes, try changing it to a rebel model or something, and see if it works then. If it does, it’s a problem with your model.

No it’s models/Humans/Group01/Female_01.mdl. It did seem like a problem with the model at first, but now it just seems it doesn’t have anything to look at.

[editline]10:50AM[/editline]

self:SetSchedule(SCHED_SCRIPTED_FACE) in ENT:Initialize() gets the SNPC to do the scripted face animations, as well as running my schedule in ENT:SelectSchedule(). Yay!