s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
live now
Game Jam III
Ends
Fri 25 Sep
Theme
One More Round
The jam is running. Build something, or play the entries.
£
50,000
prizepool
View the jam
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
input
Log in with Steam
Api
Classes
PhysicsShape
chevron_left
Classes
class
PhysicsShape
Properties
data_object
Body
data_object
Capsule
data_object
Collider
data_object
EnableSolidCollisions
data_object
EnableTouch
data_object
EnableTouchPersists
data_object
Friction
data_object
IsCapsuleShape
data_object
IsHeightfieldShape
data_object
IsHullShape
data_object
IsMeshShape
data_object
IsSphereShape
data_object
IsTrigger
data_object
IsValid
remove_circle
Scale
data_object
Sphere
data_object
Surface
data_object
SurfaceMaterial
data_object
Surfaces
data_object
SurfaceVelocity
data_object
Tags
Methods
remove_circle
AddTag
remove_circle
ClearTags
functions
DisableAllCollision
functions
EnableAllCollision
remove_circle
HasTag
functions
Remove
remove_circle
RemoveTag
functions
Triangulate
functions
UpdateHull
functions
UpdateMesh
functions
UpdatePlane
PhysicsShape
Represents a basic, convex shape. A <see cref="T:Sandbox.PhysicsBody">PhysicsBody</see> consists of one or more of these.
class
Sandbox
.
sealed
Sandbox.Engine
data_object
Properties
21
Body
PhysicsBody
The physics body we belong to.
Capsule
Capsule
Get capsule properties if we're a capsule type
Collider
Collider
The collider object that created / owns this shape
EnableSolidCollisions
bool
Controls whether this shape has solid collisions.
EnableTouch
bool
Controls whether this shape can fire touch events for its owning entity. (Entity.StartTouch, Touch and EndTouch)
EnableTouchPersists
bool
Controls whether this shape can fire continuous touch events for its owning entity (i.e. calling Entity.Touch every frame). Persist events are only sent while the contact is awake, sleeping contacts don't emit them.
Friction
float
The friction value
IsCapsuleShape
bool
Is this a CapsuleShape
IsHeightfieldShape
bool
Is this a HeightfieldShape
IsHullShape
bool
Is this a HullShape
IsMeshShape
bool
Is this a MeshShape
IsSphereShape
bool
Is this a SphereShape
IsTrigger
bool
This is a trigger (!)
IsValid
bool
Scale
obsolete
Vector3
Sphere
Sphere
Get sphere properties if we're a sphere type
Surface
Surface
SurfaceMaterial
string
Controls physical properties of this shape.
Surfaces
Surface[]
Multiple surfaces referenced by mesh or heightfield collision.
SurfaceVelocity
Vector3
Set the local velocity of the surface so things can slide along it, like a conveyor belt
Tags
ITagSet
functions
Methods
11
AddTag
(
tag
)
obsolete
bool
ClearTags
(
)
obsolete
bool
DisableAllCollision
(
)
Disable contact, trace and touch
EnableAllCollision
(
)
Enable contact, trace and touch
HasTag
(
tag
)
obsolete
bool
Remove
(
)
Remove this shape. After calling this the shape should be considered released and not used again.
RemoveTag
(
tag
)
obsolete
bool
Triangulate
(
positions
,
indices
)
Triangulate this shape.
UpdateHull
(
position
,
rotation
,
points
)
UpdateMesh
(
vertices
,
indices
)
UpdatePlane
(
center
,
rotation
,
size
)
Update a plane shape's center, rotation and size.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.