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.
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.
Member Name | Summary |
---|---|
EnableAllCollision | Enable contact, trace and touch |
DisableAllCollision | Disable contact, trace and touch |
UpdateMesh | Updates the mesh with specified vertices and indices. |
UpdateHull | Updates the hull with specified position, rotation, and points. |
Remove | Remove this shape. After calling this, the shape should be considered released and not used again. |
Triangulate | Triangulates the shape into positions and indices. |
HasTag | Checks if the shape has a specific tag. Obsolete: Use Tags. |
AddTag | Adds a tag to the shape. Obsolete: Use Tags. |
RemoveTag | Removes a tag from the shape. Obsolete: Use Tags. |
ClearTags | Clear all tags from this shape. Obsolete: Use Tags. |
Member Name | Summary |
---|---|
Body | The physics body we belong to. |
Scale | Scale of the shape. Obsolete |
Collider | The collider object that created / owns this shape |
IsTrigger | This is a trigger (!) |
SurfaceVelocity | Set the local velocity of the surface so things can slide along it, like a conveyor belt |
EnableSolidCollisions | Controls whether this shape has solid collisions. |
EnableTouch | Controls whether this shape can fire touch events for its owning entity. (Entity.StartTouch, Touch and EndTouch) |
EnableTouchPersists | Controls whether this shape can fire continuous touch events for its owning entity (i.e. calling Entity.Touch every frame) |
IsMeshShape | Is this a MeshShape |
IsHullShape | Is this a HullShape |
IsSphereShape | Is this a SphereShape |
IsCapsuleShape | Is this a CapsuleShape |
IsHeightfieldShape | Is this a HeightfieldShape |
Sphere | Get sphere properties if we're a sphere type |
Capsule | Get capsule properties if we're a capsule type |
SurfaceMaterial | Controls physical properties of this shape. |
Surface | Surface associated with this shape. |
Surfaces | Multiple surfaces referenced by mesh or heightfield collision. |
Friction | The friction value |
Tags | Tags associated with this shape. |