I have a problem I have a smooth crouching system but I while crouching I can still sprint. I tried to “tell” the game that when you press ctrl (my button for sprinting) it will automaticly uncrouch but after I did that it did uncrouch but now you can’t sprint at all. Is there a way to make a button do two things? Or maybe another solution? To be more specific when I crouch the speed is slow but when I press ctrl the speed is fast but the camera is still in crouch mode (down)
bonus points if you can tell me how to do it that when I press shift (my button for crouch) and the unpress it it will automaticly crouch and uncrouch.(not to remain crouched till I press shift again)
It’s a good solution but I want my crouch to be smooth not to make the camera teleport down and up like those that use a timeline. Thanks for trying to help tho.
I wanted to say …down and up, like those who use a timeline…
the speed of the animation blend can be adjusted int the anim blueprint.
if you select a transition rule, in its details panel, look for “blend settings” where you can adjust crossfade duration, and the type of math curve to use while blending.
that should make the skeletal mesh crouch smoothly, but if you want a smooth camera transition, you should probably not attach the camera spring arm to the capsule, and instead use a separate actor for the camera, which uses interpTo on tick to set its location.
Boolean for Is Crouching and attach it to the beginning of your sprinting script - effectively asking if the character is crouching or not before the sprint is activated. to set the bool…do with your crouch commands. when you press cntl and crouch set it to true thusly stopping the sprint.