Table of Contents

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

Vector3

Awake

public bool Awake { get; set; }

Property Value

bool

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

IReadOnlyList<ConstraintComponentBase>

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

bool

Remarks

Gravity is always active if UsePerBodyAttributes is false

InterpolationMode

public InterpolationMode InterpolationMode { get; set; }

Property Value

InterpolationMode

Kinematic

public bool Kinematic { get; set; }

Property Value

bool

LinearVelocity

public Vector3 LinearVelocity { get; set; }

Property Value

Vector3

MaterialProperties

protected override ref MaterialProperties MaterialProperties { get; }

Property Value

MaterialProperties

MinimumTimestepCountUnderThreshold

public byte MinimumTimestepCountUnderThreshold { get; set; }

Property Value

byte

Orientation

Teleports this object to a new world rotation.

public Quaternion Orientation { get; set; }

Property Value

Quaternion

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

Vector3

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

float

SpeculativeMargin

public float SpeculativeMargin { get; set; }

Property Value

float

Methods

ApplyAngularImpulse(Vector3)

public void ApplyAngularImpulse(Vector3 impulse)

Parameters

impulse Vector3

ApplyImpulse(Vector3, Vector3)

public void ApplyImpulse(Vector3 impulse, Vector3 impulseOffset)

Parameters

impulse Vector3
impulseOffset Vector3

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 RigidPose
shapeInertia BodyInertia
shapeIndex 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

int

IsContactHandlerRegistered()

protected override bool IsContactHandlerRegistered()

Returns

bool

RegisterContactHandler()

protected override void RegisterContactHandler()

UnregisterContactHandler()

protected override void UnregisterContactHandler()