private void FixedUpdate() { if (_point.IsComplete()) { gameObject.transform.position = _player.transform.position; _lineRenderer.positionCount = _navMeshAgent.path.corners.Length; _lineRenderer.SetPositions(_navMeshAgent.path.corners); } }
private void Update() { if (_point.IsComplete() && !_isOpen) { OpenDoor(); } if (transform.rotation.y >= 90f) { _isOpen = true; } if (_isOpen) { Debug.Log("door is open"); } }