How can i make a smooth transition between crouch and uncrouch with camera asset

I setup a third person camera like this:

The aim camera has the same setup, only the camera boom offset is different

i
This is camera director blueprint.

Now everything is ok, except when the player character crouches and uncrouches, the camera suddenly moves up or down.

How can i make a smooth transition between crouch and uncrouch?

I’m not on PC right now, but you can achieve that by tweaking this approach of mine for another objective to fit your use case. (Instead of transitioning between the current camera transform and the head bone and then the current camera position and the spring arm end, you’d transition between the current camera position and the new spring arm end.)

Hope this helps! :blush:

Thank you for replying.

However, my setup doesn’t include a SpringArmComponent. Currently, I’m using GameplayCamera and assigning a CameraAsset to it.

Here is my character setup:

I can switch the camera rig between default and aim smoothly, but I encounter a problem with crouching.

The spring arm end would be the location to smoothly transition to, so you can as well set a location manually for it.

Try it out this way, and if you still struggle by the weekend, then I might be able to test it myself when I get to launch my PC.

Can we solve this in the Camera rig? Because i don’t want to add extra codes.

Well yeah you can select the spring arm component, navigate to the Details window while it’s selected and enable this setting:

Screenshot 2024-12-28 100941

But this way you’re losing the ability to make intricate adjustments to the transition. Anyways try it out! Perhaps the additional settings under the Lag section will suffice in your case.


:expressionless: I just remembered you didn’t have a spring arm component. Then ig you’d be better off with a timeline with a code similar to the link I included in my initial reply, as the fella below seems to agree too.

if it was me I would “TRY” to add my own camera transition animation using a Timeline and LERP back and forth between the end and start points so you have a dial to tune the timing and speed. I would keep this based on how it felt. Also I would be tuning the FOV or movement of the camera to be closer to the character model during the crouch.

Okay, thank you guys! After a day of digging into the Game Animation Sample Project, I figured out the problem.

The issue is that I added the GameplayCamera component to the Capsule component instead of the Mesh component. When crouching, the Capsule cuts off half the height and causes the camera to flicker.

So, just add the GameplayCamera to the Mesh component and the problem is solved.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.