using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerMotor: MonoBehaviour
{
public float InputX;//左右移动
public float InputZ;//前后移动
public float Jup;//跳跃
public Vector3 desiredMoveDirection;//移动所需要的方向
public bool blockRotationPlayer;//锁定玩家方向,暂时不用
public float desiredRotationSpeed = 0.1f;//移动到所需方向上的速度插值
public Animator anim;//动画机
public float Speed;//速度,计算X、Z的平方和(X、Z∈[0,1])
public float allowPlayerRotation = 0.1f;//允许转向系数,因为X、Z中有一个参数为零,则平方相加必小于1
public Camera cam;//相机(主相机)
public CharacterController controller;//角色控制器
public bool isGrounded;//是否触地
public float G = 9.8f;//重力
//标头、滑块建立方法
[Header("Animation Smoothing"
鼠标导向+方向键移动
最新推荐文章于 2020-10-27 17:43:09 发布