示例#1
0
 void Update()
 {
     if (this.checkAngle)
     {
         float angle = Vector3Helper.GetAngleInRadians(Player.Instance.transform.forward, this.transform.position - Player.Instance.transform.position, Vector3.up);
         if (Mathf.Abs(angle) < MathConstants.Rad15Deg)
         {
             this.ActivateInteraction();
         }
         else
         {
             this.DeactivateInteraction();
         }
     }
 }