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
@@ -2,8 +2,9 @@
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!78 &1
|
||||
TagManager:
|
||||
serializedVersion: 2
|
||||
tags: []
|
||||
serializedVersion: 3
|
||||
tags:
|
||||
- NoClimb
|
||||
layers:
|
||||
- Default
|
||||
- TransparentFX
|
||||
@@ -50,27 +51,3 @@ TagManager:
|
||||
- Light Layer 5
|
||||
- Light Layer 6
|
||||
- Light Layer 7
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
Reference in new issue
Block a user