Table of Contents

Class CharacterComponentAbstract

Namespace
Stride.BepuPhysics
Assembly
Stride.BepuPhysics.dll

Abstract barebone class one can inherit from to implement custom character logic

public abstract class CharacterComponentAbstract : BodyComponent, IIdentifiable, ISimulationUpdate, IComponent<ISimulationUpdate.SimUpdateProcessor, ISimulationUpdate>, IMarkedComponent
Inheritance
object
CharacterComponentAbstract
Implements
Derived
Inherited Members
Extension Methods

Methods

AfterSimulationUpdate(BepuSimulation, float, ref InternalCharacterData)

Called after the simulation updates

protected abstract void AfterSimulationUpdate(BepuSimulation simulation, float simTimeStep, ref InternalCharacterData characterData)

Parameters

simulation BepuSimulation

The simulation this ISimulationUpdate is bound to, and the one currently updating

simTimeStep float

The amount of time in seconds this simulation lasts for

characterData InternalCharacterData

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

SimulationUpdate(BepuSimulation, float, ref InternalCharacterData, in BodyReference, out bool)

Called before the simulation updates

protected abstract void SimulationUpdate(BepuSimulation simulation, float simTimeStep, ref InternalCharacterData characterData, in BodyReference characterBody, out bool wakeupBody)

Parameters

simulation BepuSimulation

The simulation this ISimulationUpdate is bound to, and the one currently updating

simTimeStep float

The amount of time in seconds this simulation lasts for

characterData InternalCharacterData
characterBody BodyReference
wakeupBody bool