Giving a Simple Fighter Personality in Unity.
by Vicente C.
Published |
12
Share
Rawakha's fighter started as a capsule and a head. Now it leans into turns, bounces on landing and moves its shield with every stride.
In Rawakha's solo Unity 6 project, players fight fantasy monsters in small arenas. The player character has a sword, a shield, a beard and no legs. It began as a capsule with a sphere for a head.

With no arms, legs or face, Rawakha relied on body lean, head movement and squash to give it personality.

Keyframing was slow and the results were not quite right, so Rawakha began building animations that respond to speed and direction.
Rawakha calls the system Coil. A floating rigidbody capsule handles the player's movement and collisions. 

The fighter you see follows that capsule, but its animation is separate. It can lean, bob and squash without changing the capsule that the game uses for physics.

A spring holds the capsule just above the ground. Several weighted raycasts sample the surface, keeping the character from switching between grounded and falling near a ledge. The spring also gives bumps and landings a little bounce.

The fighter faces where the camera looks, but its body leans with the way it moves. Starts and stops kick the lean a little harder, while turns add a sideways roll. The tilt pivots at the base of the body rather than the middle.

The head tilts against most of the body's lean. Its spring is softer, so it catches up a little late instead of tipping over with the body like a bowling pin.
Even without feet, the fighter needs a rhythm for its steps. Rawakha tracks it with a stride phase, a number that cycles from 0 to 1 with each stride. It advances by distance traveled rather than time:
// Original code shared by Rawakha
float distance = Speed * Time.deltaTime;
Phase = Mathf.Repeat(Phase + distance * stridesPerMetre, 1f);
Stop moving and the phase stops too; run faster and it advances faster. It makes the body dip twice and sway once per stride. Every imaginary footfall also gives the body a brief squash.

Those steps also rock the shield against the fighter's arm. It trails behind on turns and settles back. Rawakha keeps its motion small enough that it still looks strapped to the forearm.
Sword attacks have been the hardest part of Coil, and Rawakha is still working on them. Each swing follows a path around the shoulder. Holding the button winds it up; releasing it sends the hand along the path.

Inverse kinematics (IK) poses the arm so the hand follows that path. Rawakha can edit the path and hand poses with gizmos in Unity's Scene view while the game runs.

You can follow Rawakha's updates and see the original demonstration below:

Interested in learning more?
If you’re interested in the technical side of Unity? The Unity Dev Bundle brings together six books covering shaders, math, procedural shapes, editor tools, and character customization.
Jettelly wishes you success in your professional career! Did you find an error? No worries! Write to us at [email protected], and we'll fix it!

Subscribe to our newsletter to stay up to date with our latest offers

© 2026 Jettelly Inc. All rights reserved. Made with ❤️ in Toronto, Canada