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

My character slides when I press any button

$
0
0
When I press any button that makes my character move, I just slide along the ground in the +X position. This does not appear to be an issue with the code, but ill throw my code in anyway. using System.Collections; using System.Collections.Generic; using UnityEngine; public class Controller : MonoBehaviour { public float moveSpeed; public float jumpSpeed; // Use this for initialization void Start () { } // Update is called once per frame void Update () { transform.rotation = Quaternion.identity; transform.Translate(Input.GetAxis("Horizontal")*moveSpeed*Time.deltaTime,Input.GetAxis("Vertical")*jumpSpeed*Time.deltaTime,0f); } }

Viewing all articles
Browse latest Browse all 827

Trending Articles