Class BindstoneAction
ECA action that binds the player's respawn location to their current position and scene. Requires the interactable to implement IBindstone. Server-only.
[Serializable]
public class BindstoneAction : BaseAction, IAction
- Inheritance
-
BindstoneAction
- Implements
- Inherited Members
Remarks
The position recorded is the player's, not the stone's, so a bind reflects where the player chose to stand. That only works if the spot is somewhere they can be put back down safely — a bind point is consumed by the respawn path with no further validation, so a bad one is permanent until the player binds again, and they may well be respawning into it precisely because they died. IsValidBindPosition(IPlayerCharacter, out string) is what makes the player's position safe to trust.
Fields
MINIMUM_CLEARANCE_MARGIN
Free space a character needs above its own head to be able to move after respawning.
public const float MINIMUM_CLEARANCE_MARGIN = 1
Field Value
Remarks
One metre. Enough that a respawn cannot land somebody in a gap they exactly fill — which passes an overlap test and is still stuck — while staying under any sane indoor ceiling, so a bindstone inside a building is not refused for being inside a building.
RequiredClearance
Total vertical clearance, in metres from the ground, a bind position must have.
[Tooltip("Total vertical clearance a bind spot needs, in metres from the ground. Always at least the character's height + 1m.")]
public float RequiredClearance
Field Value
Remarks
Floored at the character's own capsule height plus MINIMUM_CLEARANCE_MARGIN, whatever is configured here — a player needs room to stand and room to move, and a bind point is respawned into with no further validation. Raising this asks for more; lowering it cannot go below the floor, so there is no value that disables the check.
Derived from the live capsule rather than a constant, because races differ in height and a fixed number would be too strict for one and too loose for another.
Methods
Execute(ICharacter, EventData)
Sets the player's BindPosition and BindScene to their current motor position and scene name.
public override void Execute(ICharacter initiator, EventData eventData)
Parameters
initiatorICharacterThe character binding to the bindstone.
eventDataEventDataThe event data containing the interaction context.