예제 #1
0
 protected virtual void FixedUpdate()
 {
     if (PV.IsMine)
     {
         cc.UpdateMotor();               // updates the ThirdPersonMotor methods
         cc.ControlLocomotionType();     // handle the controller locomotion type and movespeed
         cc.ControlRotationType();       // handle the controller rotation type
     }
 }
예제 #2
0
        protected virtual void FixedUpdate()
        {
            if (!photonView.IsMine && PhotonNetwork.IsConnected)
            {
                return;
            }

            cc.UpdateMotor();               // updates the ThirdPersonMotor methods
            cc.ControlLocomotionType();     // handle the controller locomotion type and movespeed
            cc.ControlRotationType();       // handle the controller rotation type
        }
예제 #3
0
        protected virtual void FixedUpdate()
        {
            if (onFixedUpdate != null)
            {
                onFixedUpdate.Invoke();
            }

            Physics.SyncTransforms();
            cc.UpdateMotor();                                                   // handle the ThirdPersonMotor methods
            cc.ControlLocomotionType();                                         // handle the controller locomotion type and movespeed
            ControlRotation();
            cc.UpdateAnimator();                                                // handle the ThirdPersonAnimator methods
            updateIK = true;
        }
예제 #4
0
        protected virtual void FixedUpdate()
        {
            if (Input.GetKey(KeyCode.Space))
            {
                worldManager.SwitchToBoat();
            }

            cc.UpdateMotor();               // updates the ThirdPersonMotor methods
            cc.ControlLocomotionType();     // handle the controller locomotion type and movespeed
            cc.ControlRotationType();       // handle the controller rotation type

            Vector3 cameraTarget = transform.position - transform.forward * 10f;

            Camera.transform.position = Vector3.Lerp(Camera.transform.position, new Vector3(cameraTarget.x, cameraTarget.y + 5f, cameraTarget.z), .1f);
            Camera.transform.LookAt(transform);
        }
예제 #5
0
        protected virtual void FixedUpdate()
        {
            if (onFixedUpdate != null)
            {
                onFixedUpdate.Invoke();
            }

            cc.UpdateMotor();                                                             // handle the ThirdPersonMotor methods
            cc.ControlLocomotionType();                                                   // handle the controller locomotion type and movespeed
            if (tpCamera == null || !tpCamera.lockTarget)
            {
                cc.ControlRotationType();                                                 // handle the controller rotation type
            }
            cc.UpdateAnimator();                                                          // handle the ThirdPersonAnimator methods
            updateIK = true;
        }