Hi all!
I've made some easy simulation about moving particles, it was very interesting to unterstand how to use cache grid to make such simulations faster.
The first version without collisions, but squares show where I need to check this collisions
Yellow: no collision, green: two circle bodies in this grid square.
Particle collisions (with cache)
Particle collisions (with cache)
- Attachments
-
- particle-collisions-01.love
- (1.36 KiB) Downloaded 177 times
Last edited by darkfrei on Sun May 02, 2021 5:39 pm, edited 1 time in total.
Re: [WIP] Particle collisions (with cache)
Second version:
Added collision detection (red).
Added collision detection (red).
- Attachments
-
- particle-collisions-02.love
- (2.08 KiB) Downloaded 171 times
Re: [WIP] Particle collisions (with cache)
The last version, all collisions work as expected.
Here can be better static resolution: move circles back to the collision, calculate the rest dt and move particles in the new direction. Same as continuous collision detection.
Here can be better static resolution: move circles back to the collision, calculate the rest dt and move particles in the new direction. Same as continuous collision detection.
- Attachments
-
- particle-collisions-03.love
- (2.16 KiB) Downloaded 151 times
Who is online
Users browsing this forum: No registered users and 37 guests