Rotated rectangle collision

I needed to do some collision between arbitrarily rotated rectangles in my projects so I translated the code from this page to Unity C#.

It’s fairly simple to use, just create a RotatedRect object and use the appropriate methods to do what you want. (the important method would of course be Intersects)

Like I said it is in C#, if you want it in JavaScript then you will have to translate it yourself.

329078–11596–$rotatedrect_105.cs (8.61 KB)

Works like charm

Thank you! :wink: