Click or drag to resize

PhysicsStaticBody Class

Represents a static physics body, which has no mass or inertia tensor and does not respond dynamically to forces exerted upon it by other colliding bodies.
Inheritance Hierarchy
SystemObject
  Demo3D.VisualsPhysicsBody
    Demo3D.VisualsPhysicsStaticBody

Namespace: Demo3D.Visuals
Assembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.00.00
Syntax
C#
public class PhysicsStaticBody : PhysicsBody

The PhysicsStaticBody type exposes the following members.

Properties
 NameDescription
Public propertyAabb The axis-aligned bounding box in world space.
(Inherited from PhysicsBody)
Public propertyEnabled Whether the physics body is enabled in the physics world.
(Inherited from PhysicsBody)
Public propertyGeometry The physics collision geometry that belongs to the physics body.
(Inherited from PhysicsBody)
Public propertyGroups A copy of the list of collision groups that are prescribed to the physics body.
(Inherited from PhysicsBody)
Public propertyIsDisposed Whether the body has been disposed.
(Inherited from PhysicsBody)
Public propertyPosition The world-space position for the physics body.
(Inherited from PhysicsBody)
Public propertyRotation The world-space rotation matrix for the physics body.
(Inherited from PhysicsBody)
Public propertyTransform The world-space to local-space transformation matrix for the physics body.
(Inherited from PhysicsBody)
Public propertyTrigger Whether the static physics body is acting as a trigger.
Top
Methods
 NameDescription
Public methodAddGroup Prescribes the specified collision group to the physics body.
(Inherited from PhysicsBody)
Public methodContainsGroup Whether the physics body has been prescribed the specified collision group.
(Inherited from PhysicsBody)
Public methodDispose
(Inherited from PhysicsBody)
Protected methodDispose(Boolean)
(Inherited from PhysicsBody)
Public methodRemoveGroup Unprescribes the specified collision group from the physics body.
(Inherited from PhysicsBody)
Top
Fields
 NameDescription
Public fieldVisual The parent visual.
(Inherited from PhysicsBody)
Top
Remarks
It is easy to confuse static bodies with kinematic rigid bodies. The main difference is that kinematic bodies can have a linear and angular velocity and must be manually moved logically as they are unaffected by other bodies colliding or otherwise interacting with with them. Static bodies, on the other hand, are not supposed to move. Moving them by setting the Transform property *may* work, but it is not guaranteed to work. Whether it works or not is down to how they are implemented in the physics engine. There is one exception to this in that moving a Trigger static body *is* guaranteed to work as you would expect. So, the general rule is that if you intend to move for the body to be influenced by other bodies then you should use a regular PhysicsRigidBody. If you intend to move the body yourself without using forces (e.g. by setting the Transform, Velocity or AngularVelocity properties), then you should use a PhysicsRigidBody with the Kinematic property set to true. If you intend for the body to be stationary during its lifetime, or you want a trigger/sensor, then you should use a PhysicsStaticBody.
See Also