s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News published_with_changesChangesRelease-by-release changelog
Games
Browse Games Discover Games
gamejamslive now

Game Jam III

Ends Fri 25 Sep
ThemeOne More Round

The jam is running. Build something, or play the entries.

£50,000
prizepool
View the jam
Workshop
Playable
sports_esportsGamesStandalone games and gamemodes
Assets
landscapeMaps view_in_arModels textureMaterials apparelClothing
appsEverythingEvery asset type in one list
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
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
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.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter