First Person Turn In Place

Hello everyone!
A simple question, how can i implement a first person turn in place as is in Mirror’s Edge?
What i see is that, first it rotates the upper body, then reached a certain rotation, the legs animation is performed.
Any ideas are welcome!

In essence it’s just:

  1. Read lower body facing direction
  2. Read upper body facing direction
  3. If difference between the directions is greater than 90 degrees then rotate lower body to face the upper body direction

I believe you can accomplish this with using aim-offsets. Simply create the idle turn animations for 90 degrees, and create aim offsets for the upper body. Then you would want to get the difference between the control rotation (look direction or camera direction) and the actor rotation (this can also be used to control the aim offsets). If the difference is greater than 90 or -90, you can then trigger either of the turning animations. If the turning animations use root motion and are montages, it should work.

KingTumTum101 s approach seems legit to me.
And if you dont use root motion you can use a timeline and rInterpConstant to slowly rotate your actor to the new rotation.
Heres a quick and dirty non-root-motion solution I just made:

Its by far not the cleanest solution I guess, but it works very well already and it looks like in the video. Im hope itll point you the right way. Also im open to suggestions and hope someone can give some feedback.

The [turning] varialbe along with the [iMovementDirection] variable are then used in the animBP to trigger the turn state on and off.

https://dl.dropboxusercontent.com/u/25584030/ue4inplaceTurnGraph.PNG

Thanks guys for the answers!
I can not figure out how to properly use an AimOffset for the Yaw Axis , how to divide the upper body movement from lower body , since using " controllers yaw rotation" causes the rotation of the whole actor

You could toggle use controller yaw when the pawn is moving/stopped.

Uncheking “Use Controller Yaw Rotation” doesn’t work, the camera rotate on itself separated from the body (which doesn’t move at all)

This is the AimOffset

This is how the Yaw value is set

This is how the Anim Graph is handled

i still can’t figure out how to separate upper body rotation from the lower!

Hey mate, Ill make a video later breaking this down for you… Hang on, itll be up later or tomorrow.

That would be awesome! Thanks!

Hi friends.
I am searching a lot for this same answer!!
The exactly Mirros Edge-like movement… the player can look aroun at certain angle, and the legs turn if the angle is greather.

Any answer would be very cool :slight_smile:

While i have not done this myself yet i think you can easily achieve this if you utilize skel control nodes in the anim graph,

so the idea would be to have a root bone skel edit node which holds the character at the current rotation combined with a aim offset on top, and then when you reach your target rotation just blend out of it while playing a turn animation

There is a tutorial for this: How to make Head turn camera - thirdperson - YouTube

1 Like