wire player control setup and tune the third-person controller

Editor/PlayerControlSetup.cs is the one-shot menu that assembles the playable
player: the armature, the Cinemachine rig, the NavMesh agent, and the pointer
input wiring, so a scene can be brought up to a controllable state repeatably
rather than by hand.

StarterAssets input actions gain the pointer and interaction bindings the new
locomotion and interaction layers read, and PlayerArmature is updated to match.

ThirdPersonController blends the animator toward target speed scaled by input
magnitude. Previously a partial stick deflection or a click-to-move arrival
played a slowed run clip via MotionSpeed alone; scaling the blend makes those
use the walk cycle instead.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
2026-08-25 19:04:01 +02:00
co-authored by Claude Opus 5
parent cba87dcb31
commit ccabd3e7ac
5 changed files with 529 additions and 4 deletions
@@ -1037,6 +1037,11 @@ GameObject:
- component: {fileID: 5885216827943657505}
- component: {fileID: 135756642000475821}
- component: {fileID: 4416926081852918493}
- component: {fileID: 4411642300945204457}
- component: {fileID: 2899400238410355188}
- component: {fileID: 5730189035290769348}
- component: {fileID: 1531343089306214720}
- component: {fileID: 4718598727395454326}
m_Layer: 8
m_Name: PlayerArmature
m_TagString: Player
@@ -1155,7 +1160,7 @@ MonoBehaviour:
TopClamp: 70
BottomClamp: -30
CameraAngleOverride: 0
LockCameraPosition: 0
LockCameraPosition: 1
--- !u!114 &5885216827943657505
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -1189,8 +1194,8 @@ MonoBehaviour:
look: {x: 0, y: 0}
jump: 0
sprint: 0
analogMovement: 0
cursorLocked: 1
analogMovement: 1
cursorLocked: 0
cursorInputForLook: 1
--- !u!114 &4416926081852918493
MonoBehaviour:
@@ -1290,6 +1295,87 @@ MonoBehaviour:
m_DefaultActionMap: Player
m_SplitScreenIndex: -1
m_Camera: {fileID: 0}
--- !u!114 &4411642300945204457
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4416926081852918481}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ff77faf7e79154095ad57ad50df8c605, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::NightclubArcadia.Player.PlayerPointerInput
--- !u!114 &2899400238410355188
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4416926081852918481}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 91bf24256c6694185b4247a736593727, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::NightclubArcadia.Player.PlayerMotionArbiter
directInputCancelThreshold: 0.15
runDistanceThreshold: 6
--- !u!195 &5730189035290769348
NavMeshAgent:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4416926081852918481}
m_Enabled: 1
m_AgentTypeID: 0
m_Radius: 0.5
m_Speed: 3.5
m_Acceleration: 8
avoidancePriority: 50
m_AngularSpeed: 120
m_StoppingDistance: 0
m_AutoTraverseOffMeshLink: 1
m_AutoBraking: 1
m_AutoRepath: 1
m_Height: 2
m_BaseOffset: 0
m_WalkableMask: 4294967295
m_ObstacleAvoidanceType: 4
--- !u!114 &1531343089306214720
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4416926081852918481}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c2762b30721644611b9672bd4781cf15, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::NightclubArcadia.Player.ClickToMoveController
brainCamera: {fileID: 0}
runDistanceThreshold: 6
--- !u!114 &4718598727395454326
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4416926081852918481}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f62460e35fda4829bd6ffeffe633a7e, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::NightclubArcadia.Player.PointerNavigationInput
brainCamera: {fileID: 0}
clickMask:
serializedVersion: 2
m_Bits: 4294967295
pointerInput: {fileID: 4411642300945204457}
clickToMove: {fileID: 1531343089306214720}
motionArbiter: {fileID: 2899400238410355188}
--- !u!1 &4523139366846529165
GameObject:
m_ObjectHideFlags: 0
@@ -248,7 +248,11 @@ namespace StarterAssets
_speed = targetSpeed;
}
_animationBlend = Mathf.Lerp(_animationBlend, targetSpeed, Time.deltaTime * SpeedChangeRate);
// NightclubArcadia: blend toward speed scaled by input magnitude so
// partial stick / click-to-move arrival uses walk cycles, not a
// slowed run clip via MotionSpeed alone.
_animationBlend = Mathf.Lerp(_animationBlend, targetSpeed * inputMagnitude,
Time.deltaTime * SpeedChangeRate);
if (_animationBlend < 0.01f) _animationBlend = 0f;
// normalise input direction