Add NoClimb climb filter and kill-plane rescue to player controller
Two player-controller additions: NoClimb: colliders tagged "NoClimb" are now invisible to wall-climb and ceiling-grab. The grab detector (OnControllerColliderHit) and all three climb probes (ProbeWall, ProbeCeiling, WallInFront) skip them, so such a surface still blocks the capsule physically but can never be grabbed, re-probed onto, or treated as a ceiling. WalkableGroundBelow is left untouched (it only accepts walkable ground). The tag is read from a serialized field (default "NoClimb"); an empty tag disables the check. Rescue: a kill-plane fail-safe. The owner captures its spawn point on the first Update frame (after OnNetworkSpawn's ring offset has landed) and, if it falls below rescueMinY (-100), teleports back there with all momentum cleared, toggling the CharacterController around the write like PlaceOnSpawnRing. Owner-only; the authoritative NetworkTransform replicates the reset. Runs ahead of the control gate so it rescues in any mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
dadf9d88d4
commit
198db9a3ee
3 files changed
+60
-30
No files matched your search
@@ -126,6 +126,7 @@ MonoBehaviour:
|
||||
gravity: -14.715
|
||||
groundedStickVelocity: -2
|
||||
fallAnimationSpeed: 0.1
|
||||
rescueMinY: -100
|
||||
slideDownSteepSlopes: 1
|
||||
slideAcceleration: 20
|
||||
maxSlideSpeed: 8
|
||||
@@ -144,6 +145,7 @@ MonoBehaviour:
|
||||
wallExitGrace: 0.15
|
||||
ceilingGrabDistance: 0.02
|
||||
wallTopOutBoost: 0.3
|
||||
noClimbTag: NoClimb
|
||||
cameraOrbit: {fileID: 0}
|
||||
meshOffsetTarget: {fileID: 0}
|
||||
cameraTarget: {fileID: 4348940595172967010}
|
||||
|
||||
Reference in new issue
Block a user