예제 #1
0
 private void CameraAim()
 {
     aimCam.gameObject.SetActive(_input.aim);
     CamSensitivity             = _input.aim ? aimCamSensitivity : 1f;
     aimPos                     = Mouse3D.GetPos(new Vector3(Screen.width / 2f, Screen.height / 2f), aimLayer);
     aimDir                     = aimPos - transform.position;
     aimDir.y                   = 0f;
     aimDir                     = aimDir.normalized;
     debugAimTransform.position = aimPos;
 }
예제 #2
0
        void Update()
        {
            if (bindedSpells == null || bindedSpells.Length == 0)
            {
                return;
            }
            var pos = Mouse3D.GetPos();
            var obj = Mouse3D.GetObject();

            playerAimTarget.transform.position =
                new Vector3(pos.x, Player.Local.currPawn.spellOrigin.position.y, pos.z);
            foreach (var binding in bindedSpells)
            {
                UpdateBinding(binding, pos, obj);
            }
        }