I’m new to scripting, and there is a small formatting error in regard to a brace.
void FixedUpdate()
{
Vector3 moveDirection = new Vector3(Input.GetAxis(“Horizontal”),
0, Input.GetAxis(“Vertical”));
if {
bodyAnimator.SetBool(“IsMoving”, false);
}
else {
bodyAnimator.SetBool(“IsMoving”, true);
head.AddForce(transform.right * 150, ForceMode.Acceleration);
}
My error is in the brace after if, I get an error saying a ‘(’ is expected? How can I fix my script?
Thank you.