Commit Graph

78 Commits

Author SHA1 Message Date
Sébastien Crozet
da92e5c283 Fix clippy and enable clippy on CI 2024-01-27 17:13:08 +01:00
Sébastien Crozet
46b244167c feat!: rename narrow-phase methods for more clarity.
Renames `contacts_with` to`contact_pairs_with`; and `intersections_with` to `intersection_pairs_with`.
2024-01-24 22:51:30 +01:00
Sébastien Crozet
9b87f06a85 feat: implement new "small-steps" solver + joint improvements 2024-01-21 21:02:27 +01:00
Bruce Mitchener
4c2d18a0cd docs: Minor fixes. 2023-08-28 11:05:45 +07:00
Sébastien Crozet
0207f8cf96 Properly take initial sleeping state set by the user when creating a rigid-body 2022-12-11 17:47:42 +01:00
Sébastien Crozet
5063f3bb4f Add the ability to disable contacts between two rigid-bodies attached by joints 2022-07-03 13:55:41 +02:00
Sébastien Crozet
c9d8277377 Add contact force events generated above a user-defined threshold 2022-07-01 12:00:32 +02:00
Sébastien Crozet
66f1d6fef7 Fix contact event generation for shapes generating mulitple contact manifolds. 2022-06-21 09:28:41 +02:00
Sébastien Crozet
362b9f2f8b Fix incorrect sensor events being generated after collider removal
Fix #330
2022-05-31 16:27:53 +02:00
Sébastien Crozet
8d15ceab2a Fix bug where the narrow-phase would not recompute contacts after a collider change 2022-04-29 19:15:24 +02:00
Sébastien Crozet
ae40f4cd7e Add collision event flags 2022-04-28 13:03:14 +02:00
Sébastien Crozet
f108520b5a Finalize refactoring 2022-04-20 19:02:49 +02:00
Sébastien Crozet
2b1374c596 First round deleting the component sets. 2022-04-20 19:02:49 +02:00
Sébastien Crozet
d38740369c Emit collision stopped events after a collider is removed. 2022-03-20 21:49:16 +01:00
Sébastien Crozet
063c638ec5 Combine contact events and intersection events into a single event type and flags 2022-03-20 21:49:16 +01:00
Sébastien Crozet
a9e3441ecd Rename rigid-body static to fixed 2022-03-20 21:49:16 +01:00
Sébastien Crozet
891c08177d Rebase on master branch 2022-03-20 21:49:16 +01:00
Sébastien Crozet
28cc19d104 Allow removing a rigid-body without auto-removing attached colliders 2022-03-20 21:49:16 +01:00
zhguchev
536122e080 add defaults for the several structs 2022-01-23 18:01:50 +01:00
Sébastien Crozet
f74b8401ad Implement multibody joints and the new solver 2022-01-02 16:58:36 +01:00
Benjamin Saunders
601955b4ee Remove duplicate test 2021-10-24 13:36:29 +02:00
Jamen Marz
7aa94e994f Impl Default for a few structs 2021-09-25 13:50:12 +02:00
Kane Rogers
3f223aaf9e Fix bug with colliders without rigid bodies
- When `NarrowPhase` adds a collision pair, it checks to make sure that they don't have the same parent
- In the case where the colliders have no parents (eg. they are not attached to a `RigidBody`) this yields a false positive.
- The fix is to ensure that colliders have a parent before ignoring the pair.
2021-08-26 10:29:24 +02:00
Benjamin Saunders
92b8580761 Update intersection graph regardless of active_events 2021-07-14 20:16:19 +02:00
Crozet Sébastien
ff6c75f3bd Fix collider removal from narrow-phase when the same collider is listed twice. 2021-06-08 18:23:40 +02:00
Crozet Sébastien
7153eb7779 Add ActiveCollisionTypes to easily enable collision-detection between two non-static rigid-body. 2021-06-01 17:59:07 +02:00
Crozet Sébastien
826ce5f014 Rework the event system 2021-06-01 12:36:01 +02:00
Crozet Sébastien
1bef66fea9 Add prelude + use vectors for setting linvel/translation in builders 2021-05-25 11:00:13 +02:00
Crozet Sébastien
705876f5e5 Restore the collision pipeline 2021-04-29 10:26:44 +02:00
Crozet Sébastien
c32da78f2a Split rigid-bodies and colliders into multiple components 2021-04-26 18:00:50 +02:00
Crozet Sébastien
8173e7ada2 Allow collider modification after its insersion to the ColliderSet. 2021-03-29 14:54:54 +02:00
Crozet Sébastien
dec3e4197f Small refactoring of the PhysicsPipeline. 2021-03-28 11:54:33 +02:00
Crozet Sébastien
7306821c46 Attenuate the warmstart impulse for CCD contacts.
CCD contacts result in very strong, instantaneous, impulses. So it is preferable to attenuate their contribution to subsequent timesteps to avoid overshooting.
2021-03-28 11:27:07 +02:00
Crozet Sébastien
97157c9423 First working version of non-linear CCD based on single-substep motion-clamping. 2021-03-26 18:16:27 +01:00
Crozet Sébastien
f53d0438ed Contact modification: make the contact normal modifiable too. 2021-02-25 15:40:54 +01:00
Crozet Sébastien
96ecb877e2 Implement dominance. 2021-02-24 13:26:51 +01:00
Crozet Sébastien
babcab0bed Update the testbed to use PhysicsHooks. 2021-02-23 15:49:23 +01:00
Crozet Sébastien
00706e8b36 Introduce the PhysicsHook trait used for both contact filtering and contact modification. 2021-02-23 11:24:54 +01:00
Crozet Sébastien
ad5c10672e Use contact ids instead of contact reordering in order to identify the impulse writeback location. 2021-02-22 17:52:03 +01:00
Emil Ernerfeldt
f2d9225101 Add ColliderHandle:s to PairFilterContext
This makes it easy to write custom filters based on the handles.

For instance, a user can add pairs of `ColliderHandle`s into a `HashSet` and
do a lookup in a `ContactPairFilter` to easily (if maybe not efficiently)
disable collisions between pairs of colliders.

The same could be accomplished by using the `user_data: u128` field of the
`Collider`, but it would be less ergonomic, and also with this PR that
`user_data` space can be saved for more important things.
2021-02-17 11:19:51 +01:00
Emil Ernerfeldt
85bc81d4fc Make clippy a bit happier 2021-02-04 13:11:04 +01:00
Crozet Sébastien
8f7220f03d Rename cdl to parry. 2021-01-24 11:13:44 +01:00
Crozet Sébastien
98d3980db7 Allow several rules for combining friction/restitution coefficients. 2021-01-21 16:03:27 +01:00
Crozet Sébastien
0ade350b5f Use newtypes for collider, rigid-body and joint handles. 2021-01-20 16:33:42 +01:00
Crozet Sébastien
00da4aaa42 Add compound shape support. 2021-01-05 15:34:48 +01:00
Crozet Sébastien
aa61fe65e3 Add support of 64-bits reals. 2021-01-04 15:14:25 +01:00
Crozet Sébastien
7b098606c2 QueryPipeline: add shape casting, point projection, and intersection queries. 2020-12-31 16:30:38 +01:00
Crozet Sébastien
1feac2e02d Restore contact events. 2020-12-31 11:37:42 +01:00
Crozet Sébastien
967145a949 Perform contact sorting in the narrow-phase directly. 2020-12-31 11:16:03 +01:00
Crozet Sébastien
43628c8846 Try using solver contacts again, but in a more cache-coherent way. 2020-12-30 17:30:07 +01:00