拖入人物模型
在unity创建场景,建一个平面并把人物模型拖上去

加入跑步动画和移动代码
把跑步的动画加在人物模型上并挂上代码


为物体添加移动代码:本次使用的方式A、W、S、D键控制前后左右运动
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class yodong : MonoBehaviour
{
private Animator anim;
void Start()
{
anim = GetComponent<Animator>();
}
//定义一个速度
void Update()
{
if (Input.GetKey(Ke

在Unity中创建场景,将人物模型放置于平面上,并为模型添加跑步动画。通过挂载代码,实现了使用A、W、S、D键控制模型的前后左右移动。
最低0.47元/天 解锁文章
1018

被折叠的 条评论
为什么被折叠?



