subscribePhysicsOnStepEvents#
Fully qualified name: isaacsim::physics::manager::subscribePhysicsOnStepEvents
- registration::SubscriptionId isaacsim::physics::manager::subscribePhysicsOnStepEvents(
- bool preStep,
- int order,
- registration::OnPhysicsStepEventFunction onUpdate,
Subscribes to events before or after each physics step.
Note
Do not modify step-event subscriptions from within
onUpdate.Note
Exceptions raised by a backend subscription callback propagate to the caller. If an exception occurs after another backend accepted the subscription, that earlier backend subscription may remain active without an aggregate subscription identifier being returned.
- Parameters:
preStep – [in]
trueto invoke the callback before each step;falseto invoke it after each step.order – [in] Callback priority. Lower values run before higher values.
onUpdate – [in] Callback invoked for each matching step event.
- Returns:
A subscription identifier for use with
unsubscribePhysicsOnStepEvents(), orregistration::g_kInvalidSubscriptionIdif no backend accepted the subscription.