Local Look Source

FadelMS

Member
Hi,
I'm trying to make the AI Agent (Devils Demo) look at the Third Person Character (Nolan) using Local Look Source, but it is not working.
I didn't attach a camera to the AI Agent since the Local Look Source works for any character without camera.

1623606460331.png
 

Attachments

  • 1623601272936.png
    1623601272936.png
    12.1 KB · Views: 6
Last edited:
The target is only used by the Use / Aim abilities so if you want the agent to rotate/move towards a target then you'll need to either use the rotate towards ability or set the destination with a pathfinding implementation.
 
Thanks Justin. I'm using gameObject.transform.LookAt(Player.transform) but it generates an error complaining about the camera.viewType.LookAt when the character dies. That is why I'm trying to find an alternative to it.
 
I solved the problem by adding Third Person LookAt ViewType to the main camera. There is a preset which changes the ViewType to LookAt when the main player dies. It seems it looks for the LookAt ViewType which does not exist by default and maybe that is why it generates an error.
 
Top