class PhysicsShape

book_4_sparkGenerated
code_blocksInput

Description

The PhysicsShape class in the Sandbox namespace represents a basic, convex shape. A PhysicsBody consists of one or more of these shapes. This class is sealed and cannot be inherited.

Members

Instance Methods

Member NameSummary
EnableAllCollisionEnable contact, trace and touch
DisableAllCollisionDisable contact, trace and touch
UpdateMeshUpdate the mesh with new vertices and indices
UpdateHullUpdate the hull with new position, rotation, and points
RemoveRemove this shape. After calling this, the shape should be considered released and not used again.
TriangulateTriangulate the shape into positions and indices
HasTagCheck if the shape has a specific tag (Obsolete: Use Tags)
AddTagAdd a tag to the shape (Obsolete: Use Tags)
RemoveTagRemove a tag from the shape (Obsolete: Use Tags)
ClearTagsClear all tags from this shape (Obsolete: Use Tags)

Instance Properties

Member NameSummary
BodyThe physics body we belong to.
ScaleScale of the shape (Obsolete)
ColliderThe collider object that created / owns this shape
IsTriggerThis is a trigger (!)
SurfaceVelocitySet the local velocity of the surface so things can slide along it, like a conveyor belt
EnableSolidCollisionsControls whether this shape has solid collisions.
EnableTouchControls whether this shape can fire touch events for its owning entity. (Entity.StartTouch, Touch and EndTouch)
EnableTouchPersistsControls whether this shape can fire continuous touch events for its owning entity (i.e. calling Entity.Touch every frame)
IsMeshShapeIs this a MeshShape
IsHullShapeIs this a HullShape
IsSphereShapeIs this a SphereShape
IsCapsuleShapeIs this a CapsuleShape
IsHeightfieldShapeIs this a HeightfieldShape
SphereGet sphere properties if we're a sphere type
CapsuleGet capsule properties if we're a capsule type
SurfaceMaterialControls physical properties of this shape.
SurfaceSurface associated with the shape
SurfacesMultiple surfaces referenced by mesh or heightfield collision.
FrictionThe friction value
TagsTags associated with the shape