unity wasd movement

using UnityEngine;

public class Example : MonoBehaviour
{
    public int speed;

    // Update is called once per frame
    void FixedUpdate()
    {
        Vector3 Movement = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));

        this.transform.position += Movement * speed * Time.deltaTime;
    }
}

4.2
5
Todd murry 100 points

                                    using UnityEngine

public class Example : MonoBehaviour
{

public float speed = 10;
public Transform object;

	public void Update()
	{
    	float horizontalInput = Input.GetAxis("Horizontal");
    	float verticalInput = Input.GetAxis("Vertical");

    	Vector3 movement = new Vector3(horizontalInput, verticalInput, 0);
    	movement = movement.normalized * speed * Time.deltaTime;

    	object.transform.position += movement;
	}

}

4.2 (5 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
unity player movement wasd how to make wasd movement in unity unity wasd movement tutorial simple wasd movement unity csharp unity 3d wasd movement code player movement with wasd in 3d script for unity 3d movement unity wasd Unity WASD movement 3d unity wasd movement script unity wasd movement editor unity game movement using wasd player movement unity wasd unity player wasd movement movement with wasd unity wasd unity movement unity movement wasd c# unity movement wasd unity movement with wasd c# c# unity character movement unity c# movement simple wasd movement unity unity input wasd wasd movement unity script wasd input unity plug in script character movement unity using wasd how to move player with wasd in unity 3d how to move player with wasd in unity make a character with keys unity how to code WASD in c# 3D c++ wasd movement player model wasd unity 3d script unity check keyboard movement unity character controller keyboard unity wasd movement 3d script 3d character controller script WASD how to code a wasd movement c# unity simple wasd movement javascript unity bind movement keys player movement script unity WASD unity rpg movement wasd does unity use wasd be default wasd gameobject movement basic wasd movement unity how to move a 3d object with wasd in unity player movement wasd unity wasd in unity unity move with wasd how to move with wasd in unity movement script unity 3d wasd unity key input wsad does vector3 get wasd unity movement script wasd movement wasd script unity unity wasd movement code c# how to move a character w a s d how to make wasd controls in unity using rigidbody zqsd movement unity 3d wasd movement unity 3d how to go around with wasd in unity move wasd script unity wasd character move script unity character move script unity wasd movement on unity using wasd how to wasd in unity unity adding wasd unity get wasd input how to make my character move in wsad in unity unity move object wasd unity 2d wasd movement script wasd ujnity code wasd unity unity how to make a character move with wasd c# move character wasd unity move wasd unity movement controls unity c# wasd and jump player controller script get wasd in unity unity input control wasd wasd in unity 3d unity move player with wasd bolt sprite move with wasd unity movement code unity download wasd arrow 3d how to use wasd unity unity c# Move With wasd movement code unity download wasd unity move player keyboard simple character movement unity wasd how to add wasd controls in unity how to make wasd controls in unity wasd movement unity unity wasd movement script c# get key down wasd unity unity wasd character controller how to get wasd input from user in unity get wasd input c# wasd movement inputs unity w a s d move unity unity wasd movement
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source