Table of Contents

Interface ISimulationUpdate

Namespace
Stride.BepuPhysics.Components
Assembly
Stride.BepuPhysics.dll

Add this interface to your Entity components to get notified when physics simulation update occur

public interface ISimulationUpdate : IComponent<ISimulationUpdate.SimUpdateProcessor, ISimulationUpdate>, IMarkedComponent

Properties

Entity

The entity this component belongs to, used with SimulationSelector

Entity Entity { get; }

Property Value

Entity

Simulation

BepuSimulation? Simulation { get; }

Property Value

BepuSimulation

SimulationSelector

ISimulationSelector SimulationSelector { get; }

Property Value

ISimulationSelector

Remarks

Changing this in the middle of runtime will not change the simulation this object belongs to, you must call NotifySimulationChanged() afterward

Methods

AfterSimulationUpdate(BepuSimulation, float)

Called after the simulation updates

void AfterSimulationUpdate(BepuSimulation simulation, float simTimeStep)

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

NotifySimulationChanged()

void NotifySimulationChanged()

SimulationUpdate(BepuSimulation, float)

Called before the simulation updates

void SimulationUpdate(BepuSimulation simulation, float simTimeStep)

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