diff options
| author | Crozet Sébastien <developer@crozet.re> | 2021-06-01 12:36:01 +0200 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2021-06-01 12:36:01 +0200 |
| commit | 826ce5f014281fd04b7a18238f102f2591d0b255 (patch) | |
| tree | b35c16371dcfac726c2821b7bfd9da21184155bd /examples2d | |
| parent | 1bef66fea941307a7305ddaebdb0abe3d0cb281f (diff) | |
| download | rapier-826ce5f014281fd04b7a18238f102f2591d0b255.tar.gz rapier-826ce5f014281fd04b7a18238f102f2591d0b255.tar.bz2 rapier-826ce5f014281fd04b7a18238f102f2591d0b255.zip | |
Rework the event system
Diffstat (limited to 'examples2d')
| -rw-r--r-- | examples2d/ccd2.rs | 1 | ||||
| -rw-r--r-- | examples2d/one_way_platforms2.rs | 4 | ||||
| -rw-r--r-- | examples2d/sensor2.rs | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/examples2d/ccd2.rs b/examples2d/ccd2.rs index 1200f29..1f25586 100644 --- a/examples2d/ccd2.rs +++ b/examples2d/ccd2.rs @@ -34,6 +34,7 @@ pub fn init_world(testbed: &mut Testbed) { let collider = ColliderBuilder::cuboid(ground_thickness, ground_size) .translation(vector![2.5, 0.0]) .sensor(true) + .active_events(ActiveEvents::INTERSECTION_EVENTS) .build(); let sensor_handle = colliders.insert_with_parent(collider, ground_handle, &mut bodies); diff --git a/examples2d/one_way_platforms2.rs b/examples2d/one_way_platforms2.rs index b0f2212..6cbb2f0 100644 --- a/examples2d/one_way_platforms2.rs +++ b/examples2d/one_way_platforms2.rs @@ -72,12 +72,12 @@ pub fn init_world(testbed: &mut Testbed) { let collider = ColliderBuilder::cuboid(25.0, 0.5) .translation(vector![30.0, 2.0]) - .active_hooks(PhysicsHooksFlags::MODIFY_SOLVER_CONTACTS) + .active_hooks(ActiveHooks::MODIFY_SOLVER_CONTACTS) .build(); let platform1 = colliders.insert_with_parent(collider, handle, &mut bodies); let collider = ColliderBuilder::cuboid(25.0, 0.5) .translation(vector![-30.0, -2.0]) - .active_hooks(PhysicsHooksFlags::MODIFY_SOLVER_CONTACTS) + .active_hooks(ActiveHooks::MODIFY_SOLVER_CONTACTS) .build(); let platform2 = colliders.insert_with_parent(collider, handle, &mut bodies); diff --git a/examples2d/sensor2.rs b/examples2d/sensor2.rs index 17ed970..5dc5940 100644 --- a/examples2d/sensor2.rs +++ b/examples2d/sensor2.rs @@ -66,6 +66,7 @@ pub fn init_world(testbed: &mut Testbed) { let sensor_collider = ColliderBuilder::ball(rad * 5.0) .density(0.0) .sensor(true) + .active_events(ActiveEvents::INTERSECTION_EVENTS) .build(); colliders.insert_with_parent(sensor_collider, sensor_handle, &mut bodies); |
