Beginner Smooth Camera Blend Blueprint Problem

This is my first blueprint. When a player hits a trigger volume I want it to tell the player’s camera boom that it needs to rotate. I’m not looking at the trigger stuff right now, but I’m having problems with the rotation.

I’ve set Desired Rotation up as the target rotation I want the camera boom to smoothly blend to. At the moment the camera boom seems to continually shake just a little on the spot. This is wrong. I want it to work out the difference between the 2 rotators so as it gets closer to the target rotation it smoothly starts to decelerate. I’m multiplying by delta seconds and a constant blend speed.

If anyone could help that would be great thanks.

I think that the RInterpTo node is what you’re looking for. It starts out interpolating quickly and slows down as it approaches the target. It accepts a current rot, target rot, delta time, and the interp speed. The higher the interp speed, the less time it will take to reach the target.

A couple of observations:
Do you need world or relative rotation from the camera boom?
If you haven’t already, you may need to do disable UsePawnControlRotation (possibly some other stuff, haven’t looked) so that you can control it yourself. If you don’t do this I don’t think any of your camera controls will behave properly.
How are you getting the desired rotation? I see the node plugged into the delta but not how it’s set.

Thanks MuchToLearn i’ll give that a go. For the Desired rotation, when a player overlaps a trigger volume in the Level Blueprint I’m casting to the ThirdPersonCharacter Blueprint then calling a custom function UpdateTargetRotation() with the rotation on it.
Then in UpdateTargetRotation on the character, I just Set Desired Rotation to be the Rotation sent from the trigger box. I hope that will work.

My game is a Isometric top down twin stick shooter and I want to be able to control whether the player looks 45 degrees to the left or right. At the moment, the end of the camera boom is up and behind my pawn, with the actual follow cam attached to the end and rotated down 45 degrees. I realise that if I rotate the “boom” 45 degrees around the pawn I’ll also have to rotate the follow camera to look at the pawn too.

Cheers

Ok so its almost working which is great :slight_smile:

The only problem is that theres a slight wobble to the camera, even when the player isn’t moving. This is what it looks like:

Any ideas how I can get rid of the strange wobble/shaking?

Thanks

You should debug that BP or use a print string node to check the outputs of those rotations and see what’s changing, then find out why.

You could try using a branch node with a condition set by an “Equal Float” node to check and see if there is a difference between your current yaw for the camera and the actor/desired yaw. If that condition is true then you can call the set rotation nodes, otherwise you don’t need to do anything. You can call the branch every tick and then it will determine if the rotations need to be updated.

Thanks for the help MuchToLearn. I’m not sure why but the shake is now removed. I stripped the Yaw out of the Desired Rotation just for the Camera boom, cuz that will only ever need to rotate on it’s Yaw. The Follow cam uses all 3, pitch roll and yaw. I also set the CameraBlendSpeed to 0 when the Update target rotation function gets called. Then slowly increment it over time so I get a much smoother rotation.

When I tried to use a Branch to see if the rotation should update or not, the camera was just freezing way above the player as soon as I start the game. I’ll look at that again another day.

10cb2abfe4e3e06db414f6394c8a42c8f8f5adca.jpeg

Thanks again.