public class Sandbox.BaseChair : Sandbox.Component
Constructors
Showing 1 constructors
public BaseChair()
No results match this filter.
Methods
Showing 15 methods
public virtual sealed void AskToLeave(Sandbox.PlayerController player)
Called on the host to request leaving the chair.
public virtual Transform CalculateEyeTransform(Sandbox.PlayerController controller)
Calculates the eye transform for a seated player
public virtual bool CanEnter(Sandbox.PlayerController player)
Return true if this player can enter the chair
public virtual bool CanLeave(Sandbox.PlayerController player)
Return true if this player can leave the chair
public virtual sealed bool CanPress(Sandbox.Component.IPressable.Event e)
Chair is usable if the player can enter
protected void ClampEyes(Sandbox.PlayerController controller)
Clamps the eye angles of a seated player between the PitchRange and YawRange
protected virtual void DrawGizmos()
Draws the player model sitting in the chair if it's selected
public void Eject(Sandbox.PlayerController player)
Called on the client to eject the player from the chair.
public Vector3 FindBestExitPoint()
Returns a position to place the player when they exit the chair. This searches through ExitPoints to find the best one, which is usually the one the player is most facing towards.
public virtual Transform GetEyeTransform()
Get the transform representing the eye position when seated
public Sandbox.PlayerController GetOccupant()
Gets the player that is currently occupying the chair
public virtual System.Nullable`1<Sandbox.Component.IPressable.Tooltip> GetTooltip(Sandbox.Component.IPressable.Event e)
public virtual sealed bool Press(Sandbox.Component.IPressable.Event e)
Called when the player has pressed to use the chair. Only called if CanPress returned true.
public void Sit(Sandbox.PlayerController player)
Called on the client to place the player in the chair.
public virtual void UpdatePlayerAnimator(Sandbox.PlayerController controller, Sandbox.SkinnedModelRenderer renderer)
Called to update the player's animator when seated
No results match this filter.
Properties
Showing 11 properties
public Sandbox.GameObject[] Sandbox.BaseChair.ExitPoints { get; set; }
public Sandbox.GameObject Sandbox.BaseChair.EyePosition { get; set; }
A GameObject representing the eye position
public bool Sandbox.BaseChair.IsOccupied { get; set; }
Returns true if the chair is currently occupied
public Sandbox.GameObject Sandbox.BaseChair.SeatPosition { get; set; }
A GameObject representing the seat position
public float Sandbox.BaseChair.SitHeight { get; set; }
Height offset for sitting position, from -1 (lowest) to 1 (highest)
public Sandbox.BaseChair.AnimatorSitPose Sandbox.BaseChair.SitPose { get; set; }
The sitting pose to use when a player is seated
public string Sandbox.BaseChair.TooltipDescription { get; set; }
A longer description for this chair's tooltip.
public string Sandbox.BaseChair.TooltipIcon { get; set; }
The icon for this chair's tooltip. Either Material Icons or an Emoji.
public string Sandbox.BaseChair.TooltipTitle { get; set; }
The title of this chair's tooltip. Empty to disable.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.BaseChair |