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);
}
}
↧