Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

ERROR CS0201,error CS0201

$
0
0
Making a racing game already got the movement and camera to follow the player im working on a feature where if the player holds down the space key there speeds increase but i keep getting this error. using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { public float speed = 5.0f; public float turnspeed; public float horizontalInput; public float forwardInput; // Update is called once per frame void Update() { horizontalInput = Input.GetAxis("Horizontal"); transform.Rotate(Vector3.up, Time.deltaTime * turnspeed * horizontalInput); forwardInput = Input.GetAxis("Vertical"); transform.Translate(Vector3.forward * Time.deltaTime * speed * forwardInput); bool held = Input.GetKey(KeyCode.Space); if (held) { speed * 2.0f; } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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