I have a problem. I am making a vidogame and i am trying to rotate the player when he is moving. any idea how to do that? (i am using character controller btw)
mycode:
‘’’
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerMovement : MonoBehaviour
{
private CharacterController characterController;
public int speed = 5;
void Start()
{
characterController = GetComponent();
}
void Update()
{
Vector3 move = new Vector3(Input.GetAxis(“Horizontal”),0,Input.GetAxis(“Vertical”));
characterController.Move(moveTime.deltaTimespeed);
}
}
‘’’
thanks