using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour {
private float inputDirection;
private Vector3 moveVector;
private CharacterController controller;
// Use this for initialization
void Start () {
controller = GetComponent();
}
// Update is called once per frame
void Update () {
inputDirection=Input.GetAxis(“Horizontal”);
moveVector = new Vector3(inputDirection,0,0);
controller.Move(moveVector);
}
}
these are my codes. but my 3d object not controlling. please help me.