Help to understand how to make specific animation setup

Hello everyone. First of all I’m not sure if this is the right forum to post it because it covers C++, Animations and AnimBlueprints… But it feels like this is the right place. So if it’s wrong, please excuse me and move the post :slight_smile:

I don’t know how is this called. I don’t even what to search for google. I don’t ask you how to do it. I’m asking to give me directions on what to research. What to use. And maybe a possible algorithm.

So here’s what I want to make:
A character camera control where the character’s upper body follows the camera angle. Crysis is a great example for such type of camera. So is Dark Messiah of Might and Magic. Warface too. My first thought was to somehow control the animation using the camera’s rotation. But not really sure how this works. And came up with an algorithm like this:
The camera rotation is saved somewhere, and if it rotates in one direction < 45 degrees then it rotates the bone of the spine of the character to that direction with the changed degree. If the rotation > 45 degrees, then rotate the actual character to face the new direction.

I’ve never did animations. I’m entirely new to this. I have no idea what to use. Also I currently use AnimationStarterPack. Can I somehow use animations from there?

I’m aware of the AnimationBlueprints and StateMachine so maybe I can use them? I have no clue. Can someone suggest something?

Currently my character is influenced by the camera, but whenever the camera faces down the character is “floating”.

I think you’re talking about Aim Offset. In that case you’ll need a few pose animations and a fairly simple c++ code: you need to extract two float values (x and y offset) from the delta rotation between your character rotation and the camera (or controller) rotation:

FVector2D AimOffsetValue;


//place this in some function that is called every frame

AimOffsetValue.X =FMath::FindDeltaAngle(*CharacterRotation*.Yaw, *Camera/ControllerRotation*.Yaw);
AimOffsetValue.Y = FMath::FindDeltaAngle(*CharacterRotation*.Pitch, *Camera/ControllerRotation*.Pitch);

Just remember that FindDeltaAngle requires radians and returns radians. Then in your AnimBP event graph create 2 float variables, update them with the values of AimOffsetValue every frame and feed them in the Aim Offset node.