Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Assets/Script/PlayerController.cs(22,3): error CS1525: Unexpected symbol `rb'

$
0
0
I am following a tutorial and i have followed it to a "t" but this is the error i am getting ***Assets/Script/PlayerController.cs(22,3): error CS1525: Unexpected symbol `rb'*** This is my current script: using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerControler : MonoBehaviour { private rigidbody rb; void start () { rb = GetComponant(); } void FixedUpdate () { float moveHorizontal = Input.GetAxis ("Horizontal"); float moveVertical = Input.GetAxis ("Vertical"); Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical) rb.Addforce (movement); } }

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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