Download

Camera Rotation InterpTo Pawn Rotation

So here’s the deal, I’m trying to make a flying game, and I want to add a little bit of interpolation between the rotation of the spring arm of the camera, and the rotation of the actual Pawn.

However it doesn’t appear to be that simple. In Unreal, the Pawn is an actor, containing the mesh of the pawn, in this case an aircraft, and the spring arm and camera. So if the Pawn rotates, so does all of it’s components, I know this is default and it’s fine for most things.

But in this case, I cannot interpolate the spring arm’s rotation to the pawn, because when the pawn rotates, so does the spring arm, together.

My first thought was to separate the camera into another actor, and then control it as a separate actor, this is more complicated though, because now I have to compensate for the spring arm, since the camera actor has the camera component as it’s root, not a spring arm. So if I were to set the camera to the pawn’s location it would be inside the mesh. Not good.

Is there a simpler way? How best should I approach this?

You can set the SpringArm to use ‘Absolute Rotation’ (you toggle this by clicking on the word ‘Rotation’ next to the entry fields in the Details panel). This means the child component will not rotate relative to the parent. We use this in the third person template, for example.

SpringArm in 4.1 actually has an option for adding some translation ‘lag’, and we plan to continue to add more options to SpringArm to different camera situations.

Wow that works perfectly, thanks so much. May I add on a usability note, it’s not apparent in the UI that clicking “rotation” does anything useful