-Added Headbob
This commit is contained in:
juliuse98
2021-11-04 08:15:48 +01:00
parent 0e780162db
commit 312b51656b
9 changed files with 361 additions and 14 deletions

View File

@@ -81,7 +81,6 @@ public class PlayerController : NetworkBehaviour
}
groundAngle = Vector3.Angle(hit.normal,transform.up);
Debug.Log(moveGroundAngle);
}
}
private void OnDrawGizmos()
@@ -101,7 +100,7 @@ public class PlayerController : NetworkBehaviour
if (Input.GetButtonDown("Jump") && isGrounded)
{
//Debug.Log("Jump");
velocityY += Mathf.Sqrt(jumpHeight * 4f);
velocityY += Mathf.Sqrt(jumpHeight * -2f * gravity);
}
inputDirection = new Vector3(Input.GetAxisRaw("Horizontal"),0, Input.GetAxisRaw("Vertical")); //Get Inputs