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

Why is this not working?

$
0
0
using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { public float moveSpeed; public float jumpHeight; // Use this for initialization void Start () { } // Update is called once per frame void Update () { if(Input.GetKeyDown (KeyCode.Space)) { GetComponent().velocity = new Vector2(GetComponent().velocity.x, jumpHeight); } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



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