How can I smooth the crouching with BP?

I’m having issues figuring out how to smooth the animation in crouching using BP. From researching one the forums/Answerhub it looks like people are saying use vinterp. I’ve attached a screenshot of what I’m trying. Can someone help me out with this, (give me some advice) please?

There are some things you are doing wrong there.

First, you are interpolating to world space 0,0,32 or 0,0,64.
You need to add or subtract that amount from the actor location.

Second, Interp works by being constantly executed so you should connect that to a Tick and have it update based on a conditioned toggled by the crouch key.

Also, connect the Delta time node in Tick to the ones in InterpTo.

Ok so I was able to get the smooth effect, even though I’m not sure how to decrement the counter int one vInterp loop. How can I change this to just move the z location of the camera? Right now my whole body sinks into the ground. Also, how would I decrement the counter each VInterp loop? Better yet how could I set the Counter to the z coor of the camera location?

I’m getting closer. I’m still having the issue where I can’t just move the camera, so my whole actor moves into the ground. The event tick is also firing right off the bat so I’m not sure how to fire it on input.

Here’s another screenshot.

The uncrouched Set location should also be Tick driven since Interp doesn’t work on a single event.

Now, moving the character is not going to work. By moving it down or up, you are impaling it to the ground or levitating it. You want to use the same logic but changing the player camera’s location.

Ok, I figured out how to set the get/set camera relative location. Now the issue I’m having is there can only be one tick event. How do I spread this across two Vinterps? Also, the crouch fires on start, rather than when I push the crouch key. How do I set the tick to activate on key press?

The Tick is an event that happens every frame. The input crouch is supposed to change a bool in a branch connected to tick or open a gate connected to tick. You could have a branch set by a bool “IsCrouching”, true being the Interpto crouched and false being the Interpto Stand. IsCrouching would be toggled by your crouch key.
Also, this will only change the camera position and it won’t do anything with capsule component height. You would have to change that manually and I’m sure you can find something by searching around.

Ok I think I understand what you’re saying. This is what I have for the Camera change. It seems to be working for the most part the camera is a bit jumpy at the start of each. Perhaps because baseEyeHeight and my Uncrouched/Crouched variables don’t match up. I’ll have to work on that now. Your help/guidance is very much appreciated so thank you!

Edit: It looks like the camera auto jumps. When I hit crouch the camera instantly drops to the crouch position then does the vinterp down another 32 beyond that. Just the opposite happens when I release.

Edit 2: I figured it out I just got rid of the built in crouch and IsCrouched. I created my own boolean to control it.

Thanks!!!