subscribePhysicsContactReportEvents#
Fully qualified name: isaacsim::physics::manager::subscribePhysicsContactReportEvents
- registration::SubscriptionId isaacsim::physics::manager::subscribePhysicsContactReportEvents(
- registration::OnContactReportEventFunction onEvent,
Subscribes to contact-report events from physics backends.
Note
onEventborrows the contact-event, contact-data, and friction-anchor vectors. They remain valid only for the duration of the callback invocation and must not be retained by reference.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:
onEvent – [in] Callback invoked when a contact report is available.
- Returns:
A subscription identifier for use with
unsubscribePhysicsContactReportEvents(), orregistration::g_kInvalidSubscriptionIdif no backend accepted the subscription.