PixPoly

Tutorial 04

Strafe mode: camera-facing locomotion

8:31

Strafe mode keeps the character facing the camera. One animation per direction, diagonals interpolated through Yaw Warp, starts, stops and pivots on the right foot, Reface between Forward and Strafe, and a dedicated Turn In Place.

Chapters

  1. 0:00Enabling Strafe mode
  2. 0:19Walk and run: one animation per direction
  3. 1:03Movement Settings
  4. 1:32Switching to Strafe in game
  5. 1:56Yaw Warp and diagonals
  6. 2:43Start animations
  7. 3:40Stop animations
  8. 4:30Pivots
  9. 5:44Reface: Forward ↔ Strafe transitions
  10. 7:32Turn In Place in Strafe

Strafe mode works like Forward mode: this tutorial focuses on the differences. You add it with the plus button of the Sections tab. Its Idle loop is the same as in Forward: if it is already set up, it is reused as is.

One animation per direction

Strafe handles walking and running, but not sprinting: sprinting sideways or backwards would make no sense. Sprint therefore stays in Forward mode.

Since the character keeps facing the camera, you need one animation per direction: forward, backward, left and right. Slots are provided for the diagonals; without those animations, the plugin interpolates them through Yaw Warp.

Movement Settings

They work as in Forward: with root motion, Autofill updates the speeds. Sprint reuses the Forward mode setup.

Switching to Strafe in game

By default, clicking the mouse wheel switches the character to Strafe. The key can be changed in the Input Mapping Context, in the Input folder. If the character sprints, it goes back to Forward, then returns to Strafe as soon as it stops sprinting.

Yaw Warp and diagonals

Yaw Warp turns the legs towards the actual direction of movement, while the upper body keeps facing the camera. Without it, the legs no longer turn and the diagonals stop working properly.

  • Max: the maximum angle of this rotation. 45° is the right value — the gap between a main direction and a diagonal.
  • Speed: how fast the legs turn. At 2, the transition is too slow and the character slides; 8 works very well.

Start animations

The Start row accepts an additive, which here can be a 2D Blend Space to tilt the character in each direction. In Clip, the run’s Start offers ten slots: forward on each foot, then left, right, backward and the diagonals.

As in Forward, the animations start at 0.12 seconds, then Autofill computes the acceleration. The diagonals are interpolated, even without a dedicated animation.

Stop animations

In Strafe, each direction has a left-foot and a right-foot version: the plugin detects which foot is in front and plays the matching animation. The link icon uses a single animation for both feet. Distance matching works here too: no need to set a Start Position.

Pivots

There is no cell for sprint: its pivots are set in Forward. In Strafe, the character keeps facing the camera while changing direction, and each pivot has one version per foot.

The slot icons show the expected movement. With the Game Animation Sample, these are the BF animations (from backward to forward) and FB (the opposite); same logic for the sides. The diagonals can stay empty.

Reface: Forward ↔ Strafe transitions

A Reface is the animation played when the character switches from one mode to the other and has to turn back towards the camera — for example if it runs to the left in Forward and then switches to Strafe.

The speed does not change during a Reface: the plugin cannot detect the right moment. Set the Start Position by hand, just before the character starts turning (1.2 in the video, 1.3 for the turnarounds).

Both directions need to be set up: the Reface row of Strafe mode for Forward → Strafe, and the one of Forward mode for Strafe → Forward.

  • Min Angle: below this difference in facing, no Reface is played.
  • Back Angle: above it, the reorientation is treated as a turnaround.
  • Min Speed: the speed from which the character is considered to be moving.
  • Exit Progress: how much of the animation plays before handing back to the run cycle.
  • Warp Max: the facing difference that is compensated when the direction falls between two animations.

Turn In Place in Strafe

Without Turn In Place, the character follows the camera by rotating with no animation. Enabled, it reuses the Forward mode animations, with two settings specific to Strafe:

  • Angle Threshold: the gap between the character and the camera that triggers the Turn In Place. At 170°, the camera can turn far; at 45°, the character turns around almost immediately. The video uses 90°.
  • Re-arm Progress: the point in a rotation from which a new rotation can start. The default value, 0.9, normally works fine.

The settings in the Strafe Settings section are mostly about aiming: they are covered in the weapons tutorial.

All tutorials