Pathways
LiveEducator Hub
  • Sidebar node image

    tutorial

    Write a script for character movement
Unity Version: 2020.3
Change
Steps
  • 1 The Player Character Continued
  • 2 Create your First Script (PlayerMovement)
  • 3 Create variables for the Horizontal and Vertical axes
  • 4 How Did You Create That Variable?
  • 5 Make a Vector
  • 6 Set the Values for your Variable
  • 7 Set up the Animator component
  • 8 Create a variable to store a reference to the Animator component
  • 9 Get a reference to the Animator component
  • 10 Set up the reference to the Animator component
  • 11 Create a Rotation for Your Character
  • 12 Adjust the turnSpeed variable
  • 13 Apply Movement and Rotation to your Character
  • 14 Movement
  • 15 Rotation
  • 16 Change your Update Method
  • 17 Test your Changes
  • 18 Adjust your Game View Settings
  • 19 Summary
  • 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 © 2025 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.