Hello, I’m just starting out with unity, and for some practice to get parts of a tutorial in my head, I decided to create my own version of a character controller in C#…
I have figured out how to solve all but one my errors that I get… which is Left-hand side of an assignment must be a variable, property or an indexer. I have tried to solve this problem but then I get some other silly error which I can’t figure out.
here’s my code :
using UnityEngine;
using System.Collections;
public class capsule_move : MonoBehaviour {
//variables
public float speed ;
public Transform player ;
public float deadzone ;
//functions
//move
void FixedUpdate () {
if (Input.GetAxis("Horizontal") >deadzone) {
player.rigidbody.AddForce = new Vector3(speed,0.0f,0.0f)* Time.deltaTime ;
}
}
}
PLZ HELP MEEHH