As soon as I press play, my "CC" rises a few cm above the ground and just stays there.
Here is what I did:
1. Start a new project
2. Create the ground (Cube)
3. Create the Player(Cube) + add Character Controller to the Player
4. Add this script to the Player
public class PlayerMovement : MonoBehaviour {
public float playerSpeed = 5.0f;
CharacterController cc;
// Use this for initialization
void Start () {
cc = gameObject.GetComponent ();
}
// Update is called once per frame
void Update () {
Vector2 usrInput = new Vector2 (Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
Vector3 moveDir = new Vector3 (usrInput.x, 0, usrInput.y);
cc.Move (moveDir * Time.deltaTime * playerSpeed);
}
}
And I am having the floating issue already.
I did the same thing a few days earlier and it worked without any issues.![alt text][1]
[1]: /storage/temp/48011-floating-cc.png
↧