Tom
0
Q:

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;
    }
}
0

New to Communities?

Join the community