Pathways
LiveEducator Hub
  • Sidebar node image
    tutorial
    玩家角色:第 2 部分
Unity Version: 2020.3
Change
Steps
  • 1 玩家角色(续)
  • 2 创建您的第一个脚本 (PlayerMovement)
  • 3 为水平轴和垂直轴创建变量
  • 4 您是如何创建该变量的?
  • 5 创建矢量
  • 6 设置变量的值
  • 7 设置 Animator 组件
  • 8 创建一个变量来存储对 Animator 组件的引用
  • 9 获取对 Animator 组件的引用
  • 10 设置对 Animator 组件的引用
  • 11 为角色创建旋转
  • 12 调整 turnSpeed 变量
  • 13 将移动和旋转应用于角色
  • 14 移动
  • 15 旋转
  • 16 更改您的 Update 方法
  • 17 测试所做的更改
  • 18 调整 Game 视图设置
  • 19 总结
  • You finished!

Unity Version 2020.3

Other versions available

Don’t have a compatible version?

Install a new version from the Unity Hub

Continue
Language
Social
Learning
  • Pathways
  • Courses
  • Projects
  • Tutorials
  • Educator Hub
Live
  • Live Sessions
  • Previously recorded
Education Plans
  • Students
  • Educators
  • Institutions
  • Certifications
Resources
  • Unity Asset Store
  • Community
  • Documentation
  • Unity FAQ
  • Learn FAQ
Unity
  • Unity.com
  • Newsletter
  • Blog
  • Events
  • Unity Play
Copyright © 2026 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.