Cannot convert void to float.(27, 17): error CS0029
public class PlayerController : MonoBehaviour {
public float PlayerSpeed;
public float PlayerJumpHeight;
private float rotation;
public int PlayerHealth;
public bool IsFalling = true;
private Rigidbody rb;
// Use this for initialization
void Start ()
{
rb = GetComponent<Rigidbody> ();
}
// Update is called once per frame
void Update ()
{
rotation = rb.AddForce (new Vector3(Input.GetAxis("Horizontal"),0,0) * PlayerSpeed);
rotation *= Time.deltaTime;
rb.AddRelativeTorque (Vector3.back * rotation);
if (Input.GetKeyDown(KeyCode.UpArrow) && IsFalling == false)
{
rb.velocity = new Vector3 (0, PlayerJumpHeight, 0);
}
}
)