My vector 3 won’t highlight…,using UnityEngine;
[RequireComponent(typeof(PlayerMotor))]
public class PlayerController : MonoBehaviour {
[SerializeField]
private float speed = 5f;
private PlayerMotor motor;
void Start ()
{
motor = GetComponent<PlayerMotor>();
}
void Update ()
{
//calculate movement velocity as a 3D vector
float _xMov = Input.GetAxisRaw("horizontal");
float _zMov = Input.GetAxisRaw("Vertical");
Vector3 _movHorizontal = transform.right = *_xMov;
Vector3 _movVertical = transform.forward = * _zMov;
// Final movement vector
Vector3 _velocity = (_movHorizontal + _movVertical).nomalized * speed;
//apply movement
Motor.Move(_velocity);
}
}