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
Classes
SceneVolume
chevron_left
Classes
struct
SceneVolume
search
Constructors
functions
SceneVolume
Fields
crop_din
Box
crop_din
Capsule
crop_din
Sphere
crop_din
Type
Methods
functions
DrawGizmos
functions
GetBounds
functions
GetEdgeDistance
functions
GetVolume
functions
Test
SceneVolume
A generic way to represent volumes in a scene. If we all end up using this instead of defining our own version in everything, we can improve this and improve everything at the same time.
struct
Sandbox.Volumes
.
sealed
Sandbox.Engine
build
Constructors
1
SceneVolume
(
)
crop_din
Fields
4
Box
BBox
Capsule
Capsule
Sphere
Sphere
Type
VolumeTypes
functions
Methods
5
DrawGizmos
(
withControls
)
Draws an editable sphere/box gizmo, for adjusting the volume
GetBounds
(
)
BBox
Returns the axis-aligned bounding box that encloses the current volume.
GetEdgeDistance
(
worldTransform
,
worldPosition
)
float
Calculates the shortest distance from the specified world position to the edge of this volume.
GetVolume
(
)
float
Get the actual amount of volume in this shape. This is useful if you want to make a system where you prioritize by volume size. Don't forget to multiply by scale!
Test
(
volumeTransform
,
position
)
bool
Is this point within the volume
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.