First Person Combat
Choose First Person Combat for a conventional first-person controller where camera yaw turns the character and directional input supports forward movement, backward movement, and strafing. It suits shooters, melee combat, and interactions where body facing, item use, and the view should agree.
Use First Person Free Look instead when the player should look around without turning the character or redirecting its forward movement.
Set up the character and camera
For a new or manager-owned character:
- Open Tools > Opsive > Ultimate Character Controller > Character Manager.
- Assign the scene Character and set Perspective to First or Both.
- Set First Person Movement to First Person Combat.
- Complete the remaining character choices, then select Build Character or Update Character.
- Select the character root and expand Ultimate Character Locomotion > Movement Types. Confirm First Person Combat is present and selected in First Person Movement Type.
For an existing character that is configured directly:
- Select the character root and expand Movement Types on Ultimate Character Locomotion.
- Use the add control to add First Person Combat. Keep only one instance of that concrete type.
- Select its radio button in the Active column when the character should start in first person.
- Select First Person Combat in First Person Movement Type when the character contains more than one perspective or first-person option.
Pair the character with the matching camera:
- Select the Camera Controller, assign its Character, and expand View Types.
- Add and activate First Person Combat.
- When the camera supports both perspectives, select it in First Person View Type.
- Configure movement and look mappings through Input, then verify that the Camera Controller is attached as the player’s look source.
Editor checkpoint
Before entering Play Mode, confirm that:
- Movement Types contains one First Person Combat entry;
- First Person Movement Type points to that entry and its radio is active for a first-person start;
- the Camera Controller uses the First Person Combat View Type and its Character is assigned;
- horizontal, forward, and look input all respond in the Input setup; and
- root-motion and motor settings are configured on Ultimate Character Locomotion, not on the selected Movement Type.
Selecting First Person Combat shows no option-specific fields. The released class declares no serialized settings of its own; an empty detail area is expected.
How it moves and faces
First Person Combat leaves the two-axis movement input unchanged:
| Input | Runtime result |
|---|---|
| Forward | The character moves along its forward direction. |
| Backward | The character moves backward without turning around. |
| Left or right | The character strafes while preserving its view-facing orientation. |
| Diagonal | Ultimate Character Locomotion combines and limits both axes before applying its movement settings. |
The Movement Type obtains the attached look source’s gameplay direction and requests the shortest yaw change from the current character rotation to that direction. Camera pitch therefore aims the view up or down while the body remains upright around its configured Up direction.
With normal motor rotation, Motor Rotation Speed controls how quickly the character closes a yaw difference. The camera can lead briefly when that value is deliberately low. Movement still passes through Ultimate Character Locomotion, so acceleration, damping, backward speed, collisions, slopes, abilities, and States can change the final motion even though the Movement Type preserves the input vector.
Choose movement and rotation ownership
First Person Combat does not enable root motion or choose input settings. Make those decisions on the systems that own them:
| Goal | Configure | Expected result |
|---|---|---|
| Responsive first-person strafing driven by the controller motor | Keep Use Root Motion Position and Use Root Motion Rotation disabled, then tune Motor Acceleration, Motor Damping, Motor Backwards Multiplier, and Motor Rotation Speed. | Input produces direct motor movement while the character turns toward camera yaw. |
| Animation-authored movement with Combat facing | Enable Use Root Motion Position only when the locomotion clips contain suitable forward, backward, and strafe displacement. | The same directional input drives Animator parameters, while animation supplies position. |
| Animation- or ability-authored turns | Enable Use Root Motion Rotation, or let a specific ability override it, only when the active animation supplies the intended yaw. | Character Locomotion uses animation rotation instead of the Combat yaw request, and the Combat camera follows the character rotation. |
| A reticle and equipped item must agree with movement | Use the paired Combat View Type, the correct look source, and the item’s first-person aim setup. | Body facing, view direction, and item use communicate the same target. |
| The camera should look aside without turning the body | Change both character and camera to the Free Look pair. | Camera yaw becomes independent; movement stays relative to character facing unless Rotate With Camera On Aim is enabled on Free Look. |
Do not use a Movement Type switch as a root-motion toggle. Abilities and States can override root-motion position or rotation at runtime, so test the actual combat, interaction, jump, and positioning animations that the character will use.
Compare with First Person Free Look
The quickest comparison is to stand still and rotate the camera horizontally:
| Option | Character while looking | Movement direction | Aim choice |
|---|---|---|---|
| First Person Combat | Turns toward the Camera Controller’s gameplay look direction. | Forward, backward, and strafe remain aligned with the view-facing body. | Body and camera remain coordinated without an additional setting. |
| First Person Free Look | Normally keeps its existing yaw while the camera looks independently. | Input remains relative to the character, so forward can differ from the camera view. | Rotate With Camera On Aim can turn the body toward the camera during an input-started Aim. |
Changing only the camera or only the Movement Type produces a mixed control scheme. Switch the recommended pair together.
Verify in Play Mode
- Stand still and rotate the camera through a full horizontal turn. The character should turn toward camera yaw while vertical look changes pitch without tilting the body.
- Hold forward, backward, left, and right separately. Backward input should not turn the character around, and left and right should strafe.
- Hold a diagonal input. The character should move diagonally without gaining unintended speed or changing away from camera-facing yaw.
- Aim or use each relevant item. Reticle or view direction, character facing, and the item’s hit or projectile direction should identify the same target.
- Lower Motor Rotation Speed temporarily. Confirm that the body follows the view more slowly, then restore the intended value.
- Test one clip with Use Root Motion Position and one with Use Root Motion Rotation. Confirm position and yaw are authored by the expected source instead of fighting the motor.
- If both perspectives are installed, switch away and back. First Person Combat should become active on both Ultimate Character Locomotion and Camera Controller.
- Replace both sides temporarily with the Free Look pair. Looking sideways while standing or moving should now leave body yaw independent, making the distinction visible.
Troubleshooting
| Symptom | Check | Fix |
|---|---|---|
| The Console reports that the character has no look source. | Camera Controller is not attached to the character, or an AI character has no Local Look Source. | Assign Character on Camera Controller for the player. Configure the appropriate local or integration-owned look source for a nonplayer character. |
| The camera turns but the character keeps its old yaw. | First Person Combat may not be the active Movement Type, or root-motion rotation is overriding its yaw request. | Select First Person Combat in First Person Movement Type and the active row; then disable or correct the root-motion rotation source for the test. |
| Left or right input turns into the travel direction instead of strafing. | A different Movement Type is active. | Activate First Person Combat and retest all four cardinal inputs. |
| The body follows the camera with a noticeable delay. | Motor Rotation Speed is low, the character’s local Time Scale is reduced, or an ability is controlling rotation. | Test without the ability or State, restore normal time scale, and tune Motor Rotation Speed for the intended response. |
| Movement looks correct but animations face or travel incorrectly. | The Animator may not contain matching backward and strafe motion, especially with root-motion position. | Verify horizontal and forward Animator parameters, then use clips whose root motion matches all supported directions or disable root-motion position. |
| The reticle or item fires away from the camera-facing target. | Movement Type, View Type, look source, or item aim configuration is mismatched. | Activate the Combat pair, confirm the camera is the look source, and test the item with procedural recoil or spread removed before restoring it. |
| Perspective switching returns to another first-person style. | First Person Movement Type or First Person View Type names another option. | Set both defaults explicitly, then switch perspectives twice and verify both active rows. |
Related pages
- Included Movement Types
- Movement Types
- First Person Free Look
- First Person Combat View Type
- First Person Free Look View Type
- Input
- Character Creation
Developer details
The released class is Opsive.UltimateCharacterController.FirstPersonController.Character.MovementTypes.Combat. It is a serializable MovementType, reports FirstPersonPerspective as true, declares no serialized fields, and returns the supplied Vector2 unchanged from GetInputVector.
GetDeltaYawRotation reads m_LookSource.LookDirection(true), builds a rotation around the character’s Up direction, and returns the clamped relative yaw. In editor builds, a missing look source logs an error and returns zero. Combat inherits the normal non-independent-look result from MovementType; Free Look overrides that result and normally returns zero yaw unless its aim option is active.
There is no RecommendedViewType attribute on the Movement Type. The pairing is declared in the opposite direction: Opsive.UltimateCharacterController.FirstPersonController.Camera.ViewTypes.Combat has RecommendedMovementType(typeof(Character.MovementTypes.Combat)). Camera Controller checks that attribute when it initially attaches the character and warns in the editor if the active Movement Type is not the recommended type.
The base CharacterLocomotion source defaults Use Root Motion Position and Use Root Motion Rotation to disabled, Motor Rotation Speed to 0.15, and Motor Backwards Multiplier to 0.7. Character Manager choices, templates, abilities, and States can replace those serialized or runtime values; treat the configured character as authoritative.