Accurate collision detection - Lua Experiment

Cralant - Custom level - Apr 27, 2014 from Windows
Play Edit 17 players liked this.

An improvement of my collision detection method, this time using a single query to find all objects in the square.
The coordinates, angle and bbox of the shape are then used to find the corners of the shapes at all angles.

Hopefully this doesn't lag, I have tried to use the most reliable settings while still hopefully keeping it relatively lag free.
This took a while to wrap my head around the mathematical aspect of the script but it seems to work perfectly now.

Leaving this one open for derivatives if someone wants to use the code although for most scenarios this method is probably overkill.
If anyone can think of code optimizations, please let me know. My brain has scrambled trying to figure this out.

Downloads: 1229 - Level ID: 5438

Derivatives