第三人称——翻滚系统
百度 根据此前传闻,小米在互联网服务业务的营收达到了亿美元,而小米的互联网服务包含了网络游戏和移动支付应用。
Animator——新建一个混合树Roll
ThirdPersonRoll
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ThirdPersonRoll : MonoBehaviour
{
Animator animator;
void Awake()
{
animator = GetComponent<Animator>();
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.LeftShift))
animator.SetTrigger("roll");
}
}
PlayerController
#region 角色输入控制
#region 水平方向
float h = Input.GetAxis("Horizontal");
float v = Input.GetAxis("Vertical");
animator.SetFloat("AxisY", h);
animator.SetFloat("AxisX", v);