Basically I want my player to look at something for a certain amount of seconds, and using LookAt vaguely works. However, it will only work when the player is already roughly looking at the gameobject, then it will lock on to the target. But lets say I decide to walk facing backwards, or look up, or look down… the players view does not turn to face the target whatsoever, rather just locks on to some imaginary object. Can anybody help me out here?
SCRIPT (C#):
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LookAt : MonoBehaviour
{
public Transform monster;
void OnTriggerEnter (Collider other)
{
if (other.CompareTag("JumpScareTrigger"))
{
transform.LookAt (monster.transform);
}
}
}