-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jump and Crouch Not Working #48
Comments
Hi there, do you have 2 hitboxes? If you don't then change your player's hitbox in to a top and bottom hitbox then input the top hitbox into hitbox disable. for anything else check the video here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My code:
`using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
CharacterController2D controller2D;
float horizontalMove = 0f;
float runSpeed = 70f;
bool jump = false;
bool crouch = false;
// Update is called once per frame
void Update()
{
horizontalMove = Input.GetAxisRaw("Horizontal") * runSpeed;
if (Input.GetButtonDown("Jump"))
{
jump = true;
}
}
`
The text was updated successfully, but these errors were encountered: