19 Commits

Author SHA1 Message Date
d1feaa0602 More progress on PGS 2025-03-09 22:54:40 +04:00
a2ad9e490a Refactor collision detection to support persistent contacts across frames 2025-03-09 15:04:13 +04:00
860f9f59b6 Optimize edge separation test, use SOA structs in more places 2025-03-02 21:14:12 +04:00
503d6170c2 Fix restitution and start implementing BVH acceleration for collision 2025-03-01 19:04:01 +04:00
c91018fec8 Remove unnecessary rl dependency in physics engine 2025-03-01 13:30:25 +04:00
c2b831a4d6 Implement simulation rewind 2025-02-09 19:54:44 +04:00
d816e96c3e Refactor convex shape handling
This will allow me to implement rewind easily
2025-02-09 19:15:56 +04:00
bf995882e6 Double buffer physics state to allow easy debugging and interpolation
Fix a bug in restitution
2025-02-09 02:21:34 +04:00
ef51a9ee30 Fix convex mesh to remove coplanar faces, fix contact debug visualizer 2025-02-02 03:01:28 +04:00
25ff57168b Collisions for the convex shape 2025-02-02 02:41:24 +04:00
196bafb401 Static and dynamic friction working, it's starting to look pretty convincing
Still got a bug when colliding with edges at some specific rotations. Probably fucked relative position conversion somewhere and using a local pos instead
2025-01-26 22:43:23 +04:00
1a74039ad8 Static friction and refactor constraint params 2025-01-26 21:53:53 +04:00
19a1398068 Try to fix edge collision issues, more debug stuff 2025-01-23 04:06:11 +04:00
f2f23ee2e0 Proper stable collisions
Turns out when you get a collision pair YOU SHOULD HANDLE CONTACT RESPONSE FOR BOTH BODIES, NOT JUST ONE OF THEM
Otherwise they move and their next collision (if a->b, b->a are found and resolved separately) they might penetrate badly or worse and everything blows up

This is probably not as important in sequential impulse type solvers because the actual position update is deferred, but in a position based one it's pretty important as it turns out.

It's also better for performance because I don't have to run the collision query for the same two bodies two times
2025-01-23 02:16:12 +04:00
b40dd32b36 Funny boxes flying 2025-01-19 23:46:01 +04:00
ccefa6b952 Start implementing rigid body collision 2025-01-12 02:57:33 +04:00
e22e667e27 Fixed unstable suspension (feel like an idiot) 2025-01-07 04:23:27 +04:00
0687ff4858 Wheel friction working 2025-01-05 03:16:44 +04:00
bb77e8e821 Start of the physics engine with immediate mode api (waaat) 2025-01-04 20:05:24 +04:00