s&
newspaperAbout
infoAbout s&box newspaperLatest News published_with_changesChanges mapRoadmap monitoringMetrics
gamesGames
sports_esportsBrowse Games rocketDiscover Games
business_centerWorkshop
sports_esportsGames landscapeMaps chairModels textureMaterials apparelClothing constructionMore..
forumForum docsDocs
docsDocumentation dashboardApi Reference
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العربية
chevron_left Classes
struct
SceneTraceResult

Fields

crop_dinBodycrop_dinBonecrop_dinCollidercrop_dinComponentcrop_dinDirectioncrop_dinEndPositioncrop_dinFractioncrop_dinGameObjectcrop_dinHitcrop_dinHitboxcrop_dinHitPositioncrop_dinNormalcrop_dinScenecrop_dinShapecrop_dinStartedSolidcrop_dinStartPositioncrop_dinSurfacecrop_dinTagscrop_dinTriangle

Properties

data_objectDistance

Static Methods

functionsFrom
menu
Api
Classes
SceneTraceResult
SceneTraceResult
struct Sandbox .
sealedSandbox.Engine

crop_din Fields 19

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
Tags
String[]
The tags that the hit shape had
Triangle
int
The triangle index hit, if we hit a mesh physics shape

data_object Properties 1

Distance
float
The distance between start and end positions.

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