s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Components
BaseChair
chevron_left
Components
class
BaseChair
search
Constructors
functions
BaseChair
Properties
data_object
ExitPoints
data_object
EyePosition
data_object
IsOccupied
data_object
PitchRange
data_object
SeatPosition
data_object
SitHeight
data_object
SitPose
data_object
TooltipDescription
data_object
TooltipIcon
data_object
TooltipTitle
data_object
YawRange
Methods
functions
AskToLeave
functions
CalculateEyeTransform
functions
CanEnter
functions
CanLeave
functions
CanPress
lock
ClampEyes
lock
DrawGizmos
functions
Eject
functions
FindBestExitPoint
functions
GetEyeTransform
functions
GetOccupant
functions
GetTooltip
functions
Press
functions
Sit
functions
UpdatePlayerAnimator
BaseChair
class
Sandbox
.
account_tree
extends
Component
Sandbox.Engine
build
Constructors
1
BaseChair
(
)
data_object
Properties
11
ExitPoints
GameObject[]
EyePosition
GameObject
A GameObject representing the eye position
IsOccupied
bool
Returns true if the chair is currently occupied
PitchRange
Vector2
Pitch range for seated players
SeatPosition
GameObject
A GameObject representing the seat position
SitHeight
float
Height offset for sitting position, from -1 (lowest) to 1 (highest)
SitPose
AnimatorSitPose
The sitting pose to use when a player is seated
TooltipDescription
string
A longer description for this chair's tooltip.
TooltipIcon
string
The icon for this chair's tooltip. Either Material Icons or an Emoji.
TooltipTitle
string
The title of this chair's tooltip. Empty to disable.
YawRange
Vector2
Yaw range for seated players
functions
Methods
15
AskToLeave
(
player
)
Called on the host to request leaving the chair.
CalculateEyeTransform
(
controller
)
Transform
Calculates the eye transform for a seated player
CanEnter
(
player
)
bool
Return true if this player can enter the chair
CanLeave
(
player
)
bool
Return true if this player can leave the chair
CanPress
(
e
)
bool
Chair is usable if the player can enter
ClampEyes
(
controller
)
Clamps the eye angles of a seated player between the PitchRange and YawRange
DrawGizmos
(
)
Draws the player model sitting in the chair if it's selected
Eject
(
player
)
Called on the client to eject the player from the chair.
FindBestExitPoint
(
)
Vector3
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.
GetEyeTransform
(
)
Transform
Get the transform representing the eye position when seated
GetOccupant
(
)
PlayerController
Gets the player that is currently occupying the chair
GetTooltip
(
e
)
Nullable`1
Press
(
e
)
bool
Called when the player has pressed to use the chair. Only called if CanPress returned true.
Sit
(
player
)
Called on the client to place the player in the chair.
UpdatePlayerAnimator
(
controller
,
renderer
)
Called to update the player's animator when seated
Inheritance
Component
BaseChair
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.