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 schoolTutorials
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
PhysicsTraceResult
chevron_left Classes
struct
PhysicsTraceResult

Fields

crop_dinBodycrop_dinDirectioncrop_dinEndPositioncrop_dinFractioncrop_dinHitcrop_dinHitPositioncrop_dinNormalcrop_dinShapecrop_dinStartedSolidcrop_dinStartPositioncrop_dinSurfacecrop_dinTriangle

Properties

data_objectBonedata_objectDistanceremove_circleTags

Methods

functionsHasTag
PhysicsTraceResult
struct Sandbox .
sealedSandbox.Engine

crop_din Fields 12

Body
PhysicsBody
The physics object that was hit, if any
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
Hit
bool
Whether the trace hit something or not
HitPosition
Vector3
The hit position of the trace
Normal
Vector3
The hit surface normal (direction vector)
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 3

Bone
int
The id of the hit bone (either from hitbox or physics shape)
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.
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