s&
infoAbout
infoAbout s&box newspaperLatest News published_with_changesChanges mapRoadmap monitoringMetrics
gamesGames
sports_esportsBrowse Games exploreDiscover Games
categoryWorkshop
sports_esportsGames landscapeMaps view_in_arModels textureMaterials apparelClothing constructionMore..
forumForum menu_bookLearn
docsDocumentation apiApi Reference schoolTutorials manage_searchCode Search
inputLog in with Steam chevron_leftChange Language
简体中文EnglishРусскийEspañolPortuguês-BrasilDeutsch日本語FrançaisPolskiTürkçe한국어PirateItalianoไทย繁體中文УкраїнськаČeštinaNederlandsMagyarDanskSuomiSvenskaNorskΕλληνικάRomânăБългарскиTiếng ViệtBahasa IndonesiaEspañol-Latinoaméricaالعربية
Api
Classes
SceneTraceResult
chevron_left Classes
struct
SceneTraceResult

Fields

crop_dinBodycrop_dinBonecrop_dinCollidercrop_dinComponentcrop_dinDirectioncrop_dinEndPositioncrop_dinFractioncrop_dinGameObjectcrop_dinHitcrop_dinHitboxcrop_dinHitPositioncrop_dinNormalcrop_dinScenecrop_dinShapecrop_dinStartedSolidcrop_dinStartPositioncrop_dinSurfacecrop_dinTriangle

Properties

data_objectDistanceremove_circleTags

Methods

functionsHasTag

Static Methods

functionsFrom
SceneTraceResult
struct Sandbox .
sealedSandbox.Engine

crop_din Fields 18

Body
PhysicsBody
The physics object that was hit, if any
Bone
int
The id of the hit bone (either from hitbox or physics shape)
Collider
Collider
The Collider that was hit
Component
Component
The Component that was hit
Direction
Vector3
The direction of the trace ray
EndPosition
Vector3
The end or hit position of the trace
Fraction
float
A fraction [0..1] of where the trace hit between the start and the original end positions
GameObject
GameObject
The GameObject that was hit
Hit
bool
Whether the trace hit something or not
Hitbox
Hitbox
The hitbox that we hit
HitPosition
Vector3
The hit position of the trace. Requires Sandbox.SceneTrace.UseHitPosition(System.Boolean).
Normal
Vector3
The hit surface normal (direction vector)
Scene
Scene
Shape
PhysicsShape
The physics shape that was hit, if any
StartedSolid
bool
Whether the trace started in a solid
StartPosition
Vector3
The start position of the trace
Surface
Surface
The physical properties of the hit surface
Triangle
int
The triangle index hit, if we hit a mesh physics shape

data_object Properties 2

Distance
float
The distance between start and end positions.
Tags
obsoleteString[]
The tags that the hit shape had.

functions Methods 1

HasTag (tag)
bool
Returns true if the hit shape has this tag.

functions Static Methods 1

From (scene, r)
SceneTraceResult
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter