Hello everyone. So, here is my problem. My player won’t crouch! I set up the blueprints and everything, but he still won’t crouch. I made sure to check “can crouch”. It still won’t work, though. Here is a picture of of my settings. Do you know why it’s not working. I’ve been having trouble with this for so long. Thanks
I see your Can Crouch variable is replicated. Is this a multiplayer game? I think the cause of your problem might be that you are not handling replication properly.
Yeah, it is a multiplayer game, but i’m testing it with one player. could the replication be the cause, or does it only affect it in multiplayer?
It’s hard to determine what’s happening based off of just that input call.
So, I’ll go through debugging steps instead.
- Does your input action crouch trigger?
- Is your mesh’s GetAnimInstance returning an actual CharacterAnimationBlueprint?
- Does your character’s Crouch function trigger even once?
Yeah, I know all that stuff is true because it is triggering the crouch animation, but the character isn’t actually crouching. Just triggering the animation.
I’m confused, doesn’t that make him crouch? Since the animation does trigger.
Well, I was hoping the camera would move down, like I’ve seen on tutorials, but it doesn’t. It just stays the normal player head height.
The camera on a character is fixed unless you program it otherwise. So, if you want the camera to move down, you need to add that functionality to your crouch function.
Oh, ok. It’s kinda weird though because in the tutorials i’ve watched all they did was put the crouch function and the camera moved down. Also, why would there be a crouched height thing in the settings under camera?
In the character movement component settings make sure “can crouch” is checked