一,在Hierarchy创建一个3D平面Terrain,导入资源包,添加人物模型。
二,在Project创建一个New Animator Controller,
三,在点开Animator,打开人物模型并将拖入。
四,点击拖入资源,选择创建过渡线,与你所需物连接。
五,在Parameters,中点击加号,选择bool并命名。
private Animator anim;
//w键前进
if (Input.GetKeyDown(KeyCode.W))
{
this.gameObject.transform.Translate(new Vector3(0, 0, 50 * Time.deltaTime));
anim.