Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
Most efficient way (well ... simplest efficient way) would be to make a rectangular object sprite, create an invisible object using that as a mask and then stretching it to the same size and angle and then check a collision based on that. You could probably work the whole thing into a single script.
Otherwise you are going to have to use a series of collision line functions and depending on the detail of accuracy you need that could be a lot of wasted resources.