Applying different rotation lag to each axis of a spring arm

This is a simple way to add different amounts of rotation lag to the different axes of a spring arm. Just check the order that the rotators are combined (added), because with rotators it does matter. I found the order of ‘roll + pitch + yaw’ works fine:

To smooth it further, overall, you can also turn on rotation lag in the spring arm.

I’ll just add that the Camera Manager provides an override for the camera behaviour. So this script could probably live there:

Especially handy if you have many cameras. Camera Target is the player controller’s current View Target; have the interface return pertinent data and one can handle all kind of behaviours in a single dedicated BP without cluttering pawns’ script.

2 Likes

@Everynone I hadn’t thought of this, so useful!

Here’s an updated version, with a little more explanation.

image

The obvious, common-sense choice of using ‘Get Actor Rotation’, will give you a hitch going beyond 90 degrees in pitch. It’s not a bug, it’s actually useful to have several format options… as long as people are aware of them… described in link below:

The 3 rotation formats in Blueprints - 1) Get Actor Rotation 2) Control Rotation 3) Normalized Rotation - Programming & Scripting / Blueprint - Epic Developer Community Forums (unrealengine.com)

Forgot to mention Base Aim Rotation which is what the server uses. If you want client and server traces to hit really close and use the cameras replication location you have to use Base Aim Rotation and Camera Manager → Camera Location.

Without using these two you can get the following. Camera is attached to head bone. (server is purple trace)

image

With Base aim and Cam mang location

1 Like

@Rev0verDrive Thank U for Ur valuable contributions!

But I think in this case U intended to post to a different thread. Honestly it’s very interesting to learn more about ‘Base Aim Rotation’ though :slight_smile:

My bad, it was in response to

1 Like

Ah, it’s ok! :slight_smile: Though in that post I was just outlining about the 3 different rotator formats that UE5 blueprints uses under the hood.

It sure is worth mentioning here though, because it’s related: ‘Get Base Rotation’ uses the standard format. Applying this format would cause a hitch at +/- when mashing together the three above-pictured 'Rinterp’s together in such an unconventional way.

But combining the control rotation and normalized control rotation formats to the three Rinterps into a frankensteined rotator that stays buttery smooth through 360 degrees does work. For reference, here are the 3 different formats I’ve come across:

Standard rotation:
Roll: +/- 0 to 180
Pitch: +/- 0 to 90 (this is a bit confusing, but it goes up and back down)
Yaw: +/- 0 to 180

Control rotation:
Roll: 0 to 360
Pitch: 0 to 360
Yaw: 0 to 360

Normalized control rotation:
Roll: +/- 0 to 180
Pitch: +/- 0 to 180
Yaw: +/- 0 to 180