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
-
objectCharacterComponentAbstract
- 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
simulationBepuSimulationThe simulation this ISimulationUpdate is bound to, and the one currently updating
simTimeStepfloatThe amount of time in seconds this simulation lasts for
characterDataInternalCharacterData
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
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
simulationBepuSimulationThe simulation this ISimulationUpdate is bound to, and the one currently updating
simTimeStepfloatThe amount of time in seconds this simulation lasts for
characterDataInternalCharacterDatacharacterBodyBodyReferencewakeupBodybool