Class BodyComponent
- Namespace
- Stride.BepuPhysics
- Assembly
- Stride.BepuPhysics.dll
[ComponentCategory("Physics - Bepu")]
public class BodyComponent : CollidableComponent, IIdentifiable
- Inheritance
-
BodyComponent
- Implements
- Derived
- Inherited Members
Properties
AngularVelocity
public Vector3 AngularVelocity { get; set; }
Property Value
Awake
public bool Awake { get; set; }
Property Value
BodyInertia
public BodyInertia BodyInertia { get; set; }
Property Value
- BodyInertia
Constraints
The constraints targeting this body, some of those may not be Attached
public IReadOnlyList<ConstraintComponentBase> Constraints { get; }
Property Value
ContinuousDetection
public ContinuousDetection ContinuousDetection { get; set; }
Property Value
- ContinuousDetection
ContinuousDetectionMode
Shortcut to ContinuousDetection.BepuPhysics.Collidables.ContinuousDetection.Mode
public ContinuousDetectionMode ContinuousDetectionMode { get; set; }
Property Value
- ContinuousDetectionMode
Gravity
Whether gravity should affect the simulation's PoseGravity
public bool Gravity { get; set; }
Property Value
Remarks
Gravity is always active if UsePerBodyAttributes is false
InterpolationMode
public InterpolationMode InterpolationMode { get; set; }
Property Value
Kinematic
public bool Kinematic { get; set; }
Property Value
LinearVelocity
public Vector3 LinearVelocity { get; set; }
Property Value
MaterialProperties
protected override ref MaterialProperties MaterialProperties { get; }
Property Value
MinimumTimestepCountUnderThreshold
public byte MinimumTimestepCountUnderThreshold { get; set; }
Property Value
Orientation
Teleports this object to a new world rotation.
public Quaternion Orientation { get; set; }
Property Value
Remarks
Using this property to move objects around is not recommended, as it disregards any collider that may overlap with the body at this new orientation, you should make sure the area is clear to ensure this object does not become stuck in the scenery.
Pose
protected override RigidPose? Pose { get; }
Property Value
- RigidPose?
Position
Teleports this object to a new world position.
public Vector3 Position { get; set; }
Property Value
Remarks
Using this property to move objects around is not recommended, as it disregards any collider that may overlap with the body at this new position, you should make sure the area is clear to ensure this object does not become stuck in the scenery.
SleepThreshold
public float SleepThreshold { get; set; }
Property Value
SpeculativeMargin
public float SpeculativeMargin { get; set; }
Property Value
Methods
ApplyAngularImpulse(Vector3)
public void ApplyAngularImpulse(Vector3 impulse)
Parameters
impulse
Vector3
ApplyImpulse(Vector3, Vector3)
public void ApplyImpulse(Vector3 impulse, Vector3 impulseOffset)
Parameters
ApplyLinearImpulse(Vector3)
public void ApplyLinearImpulse(Vector3 impulse)
Parameters
impulse
Vector3
AttachInner(RigidPose, BodyInertia, TypedIndex)
Called every time this is added to a simulation
protected override void AttachInner(RigidPose pose, BodyInertia shapeInertia, TypedIndex shapeIndex)
Parameters
pose
RigidPoseshapeInertia
BodyInertiashapeIndex
TypedIndex
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
GetHandleValue()
protected override int GetHandleValue()
Returns
IsContactHandlerRegistered()
protected override bool IsContactHandlerRegistered()
Returns
RegisterContactHandler()
protected override void RegisterContactHandler()
UnregisterContactHandler()
protected override void UnregisterContactHandler()