What this would do is simply check if there are any other parts intersecting with the part the method was called on, and return them. Parts inside of the ignorelist would be ignored.
This method would be amazingly useful when it comes to custom character movement; it’d allow for proper and efficient collision detection. I had an awesome tech demo set up for an anchored character that moved using CFrames and interpolation, but I had to scrap it because I couldn’t figure out how to do 3D collision detection.
look up hyperplane seperation axis theorum, or OBB-OBB collision test if you want to make your own, I have some scrap code laying around somewhere I could dig up if you wanted it
If you could dig up some working code, that’d help a lot, although I haven’t been able to understand the SAT. I just figured a method like this would be more efficient and support unions and other shapes.
If you want the poor-man’s way and the parts intersect due to them moving into each other, then you could just watch all the Touch and TouchEnded events.
turns out I optimized my SAT collision test to be AABB-OBB, to save on calculations(apply a inverse coordinate space transform on both CFrames, so that one of them is aligned to world axes), but I’ll post anyway, as it is still a SAT collision test:
PS: leaker, I’m just trying to help someone out, please don’t share this, it would mean a lot to me, thanks!
be warned, it looks a bit obfuscated (worst than just being hard math) because I manually optimized large portions of the code to get it to run faster, I haven’t tested it in a while, but last I know, it works