Rapier C — 2D / f64 0.36.0+c.0
Loading...
Searching...
No Matches
R2ContactForceEvent Struct Reference

Contact-force event, enabled by flags and the collider force threshold. More...

#include <rapier.h>

Data Fields

struct R2ColliderHandle collider1
 First collider in the pair.
struct R2ColliderHandle collider2
 Second collider in the pair.
struct R2Vector total_force
 Sum of world-space contact forces.
R2Real total_force_magnitude
 Sum of contact force magnitudes.
struct R2Vector max_force_direction
 World-space direction of the strongest contact force.
R2Real max_force_magnitude
 Magnitude of the strongest contact force.
R2Bool started
 1 for the first step the total force magnitude exceeds the threshold, 0 on the following steps while it stays above it.

Detailed Description

Contact-force event, enabled by flags and the collider force threshold.

Field Documentation

◆ collider1

struct R2ColliderHandle R2ContactForceEvent::collider1

First collider in the pair.

◆ collider2

struct R2ColliderHandle R2ContactForceEvent::collider2

Second collider in the pair.

◆ max_force_direction

struct R2Vector R2ContactForceEvent::max_force_direction

World-space direction of the strongest contact force.

◆ max_force_magnitude

R2Real R2ContactForceEvent::max_force_magnitude

Magnitude of the strongest contact force.

◆ started

R2Bool R2ContactForceEvent::started

1 for the first step the total force magnitude exceeds the threshold, 0 on the following steps while it stays above it.

No event is emitted when the force drops below it.

◆ total_force

struct R2Vector R2ContactForceEvent::total_force

Sum of world-space contact forces.

◆ total_force_magnitude

R2Real R2ContactForceEvent::total_force_magnitude

Sum of contact force magnitudes.


The documentation for this struct was generated from the following file: