Answer the question
In order to leave comments, you need to log in
Why is the character walking in the wrong direction?
Hello, there is such a script for character movement in 3D:
using UnityEngine;
public class Controller : MonoBehaviour
{
public float speed = 10f;
public CharacterController characterController;
Vector3 move;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
float horizontal = Input.GetAxis("Horizontal");
float vertical = Input.GetAxis("Vertical");
move = transform.forward * horizontal + transform.right * vertical;
characterController.Move(move * speed * Time.deltaTime);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question