Class StaticComponent
- Namespace
- Stride.BepuPhysics
- Assembly
- Stride.BepuPhysics.dll
[ComponentCategory("Physics - Bepu")]
public class StaticComponent : CollidableComponent, IIdentifiable
- Inheritance
-
objectStaticComponent
- Implements
- Inherited Members
- Extension Methods
Properties
CollidableReference
protected override CollidableReference? CollidableReference { get; }
Property Value
- CollidableReference?
ContinuousDetection
public ContinuousDetection ContinuousDetection { get; set; }
Property Value
- ContinuousDetection
MaterialProperties
protected override ref MaterialProperties MaterialProperties { get; }
Property Value
Orientation
The rotation of this body in the physics scene, setting it will 'teleport' this object's rotation to the one provided.
public Quaternion Orientation { get; set; }
Property Value
Remarks
This is performed automatically by the engine at the end of the frame when this entity's TransformComponent has been moved,
you may call this manually earlier if needed.
Moving statics is very inefficient, do not write to this property every frame.
Writing to this property is equivalent to calling Teleport(Vector3, Quaternion).
This property overwrites this Transform's data.
Exceptions
- ArgumentException
valuemust be normalized
Pose
protected override RigidPose? Pose { get; }
Property Value
- RigidPose?
Position
The position of this static in the physics scene, setting it will 'teleport' this object to the position provided.
public Vector3 Position { get; set; }
Property Value
Remarks
This is performed automatically by the engine at the end of the frame when this entity's TransformComponent has been moved,
you may call this manually earlier if needed.
Moving statics is very inefficient, do not write to this property every frame.
This value is slightly offset from this entity's Transform Position based on its CenterOfMass.
Writing to this property is equivalent to calling Teleport(Vector3, Quaternion).
This property overwrites this Transform's data.
Exceptions
- ArgumentException
valuemust be finite
Methods
AttachInner(RigidPose, BodyInertia, TypedIndex)
Called every time this is added to a simulation
protected override void AttachInner(RigidPose pose, BodyInertia shapeInertia, TypedIndex shapeIndex)
Parameters
poseRigidPoseshapeInertiaBodyInertiashapeIndexTypedIndex
Remarks
May occur when certain larger changes are made to the object, Simulation is the one this object is being added to
DetachInner()
Called every time this is removed from the simulation
protected override void DetachInner()
Remarks
May occur right before AttachInner(RigidPose, BodyInertia, TypedIndex) when certain larger changes are made to the object, Simulation is the one this object was on prior to detaching
Teleport(Vector3, Quaternion)
Teleport this static into a new pose
public void Teleport(Vector3 position, Quaternion orientation)
Parameters
positionVector3orientationQuaternion
Remarks
This is performed automatically by the engine at the end of the frame when this entity's TransformComponent has been moved,
you may call this manually earlier if needed
position is slightly offset from this entity's Transform Position based on its CenterOfMass.
This method overwrites this Transform's data.
Exceptions
- ArgumentException
orientationmust be normalized;positionmust be finite