Chapter 6 Void to Bool Error

Hi, I get an error saying that I cannot implicitly convert a void to bool.
Here is my PlayerController Script.

void FixedUpdate()
{
Vector3 moveDirection = new Vector3(Input.GetAxis(“Horizontal”),
0, Input.GetAxis(“Vertical”));
if bodyAnimator.SetBool(“IsMoving”, false);

    // TODO
    else {
        bodyAnimator.SetBool("IsMoving", true);
        head.AddForce(transform.right * 150, ForceMode.Acceleration);
    }

The error is with bodyAnimator.SetBool(“IsMoving”, false);

Thank you.

This topic was automatically closed after 166 days. New replies are no longer allowed.