Add first-person camera mode with pose-aware eye offset and yaw facing
Introduce a FirstPersonController / FirstPersonMode pair (mirroring the free-cam mode) wired into the GameModeManager Tab cycle. In first person the mesh is hidden, the eye sits on CameraTarget plus a per-pose firstPersonCameraTargetYOffset, and the character body yaw is driven to match the camera via a new single-writer FaceYaw hook on PlayerCharacterController. Also includes user content edits (poses, prefabs, scene) carried along. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
381b21cd02
commit
cfb767f6cb
17 files changed
+681
-91
No files matched your search
@@ -58,6 +58,12 @@ public class PlayerPose : ScriptableObject
|
||||
"tracks, without moving the body. Meters.")]
|
||||
[SerializeField] private float cameraTargetYOffset;
|
||||
|
||||
[Tooltip("Additional local-up offset applied to the first-person eye (the FirstPersonController's camera " +
|
||||
"position) while this pose is active, on top of the shared camera target. Only affects first " +
|
||||
"person — never the body or the ThirdPersonCamera. Lets a low pose (ball/star) keep its eye at a " +
|
||||
"sensible height even though the camera target sits where third-person frames it. Meters.")]
|
||||
[SerializeField] private float firstPersonCameraTargetYOffset;
|
||||
|
||||
/// <summary>Idle clip held while the player stands still in this pose (may be null).</summary>
|
||||
public AnimationClip Clip => clip;
|
||||
|
||||
@@ -87,4 +93,7 @@ public class PlayerPose : ScriptableObject
|
||||
|
||||
/// <summary>Local-up offset applied to the camera target while this pose is active (any state).</summary>
|
||||
public float CameraTargetYOffset => cameraTargetYOffset;
|
||||
|
||||
/// <summary>Additional local-up offset for the first-person eye, on top of the camera target (first person only).</summary>
|
||||
public float FirstPersonCameraTargetYOffset => firstPersonCameraTargetYOffset;
|
||||
}
|
||||
Reference in new issue
Block a user