Skip to content

Inefficient Particle Collision Detection #1

Description

@David314159

I noticed that the collision detection algorithm currently implemented is inefficient. Under our current system, the algorithm will check if particle A has collided with particle B. Then, during the same frame, it will check if particle B has collided with particle A.

In short, we should record the pairs of collisions we have checked. If n is the number of particles, it will reduce the number of checks from n(n-1) to n(n-1)/2, doubling the efficiency of our algorithm.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions