Home Forums Software Development Delay in GazeAwareComponent Reply To: Delay in GazeAwareComponent


Just an update, I finally noticed “Delay in Milliseconds” in the inspector for GazeAware, but changing that doesn’t seem to help (in fact, putting it above zero just seems to make it take longer picking HasGaze the first time).
As a secondary issue, I tried implementing the same thing for characters (have them turn towards the player if the player looks at them), but it doesn’t seem to work at all. Here is the code I used:

	private GazeAwareComponent _gazeAware;
	public Transform target;
	// Use this for initialization
	void Start () {
		_gazeAware = GetComponent<GazeAwareComponent>();
	// Update is called once per frame
	void Update () {
		if (_gazeAware.HasGaze)
			Vector3 relativePos = target.position - transform.position;
			transform.rotation = Quaternion.LookRotation(relativePos);

If I comment out the if (_gazeAware.HasGaze) and just have the contents of that if block run directly, the characters are constantly turning to face the character, so I know that isn’t the issue, but instead it has something with how I’m probably incorrectly implementing the check. Help?