Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

Unwanted Character Controller Floating

$
0
0
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

Viewing all articles
Browse latest Browse all 827

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>