Just a note.

What I am doing here, is finding the base angles in radians of the 4 points of a rectangle. If it was a square, then the base angle points are...

Top Left = pi * (5/4)

Top Right = pi * (7/4)

Bottom Left = pi * (3/4)

Bottom Right = (pi/4)

The reasoning behind this is basically if you can imagine a circle encasing the square/rectangle, I can find the points of the square/rectangle when I rotate the square/rectangle, by adding the rotation angle to the base angle and working out the points using the formula

x = Origin.X * (Radius * (Cos(Angle)))

y = Origin.Y * (Radius * (Sin(Angle)))

Then from those 4 points I can construct 4 lines which I can use to check for collision, and then perform Vector Reflection if a collision is made with the line.

I will probably end up making an object that can handle all square/rectangular objects, I just need to find the formula to calculate the base angles of the points on the square/rectangle.

What I am doing here, is finding the base angles in radians of the 4 points of a rectangle. If it was a square, then the base angle points are...

Top Left = pi * (5/4)

Top Right = pi * (7/4)

Bottom Left = pi * (3/4)

Bottom Right = (pi/4)

The reasoning behind this is basically if you can imagine a circle encasing the square/rectangle, I can find the points of the square/rectangle when I rotate the square/rectangle, by adding the rotation angle to the base angle and working out the points using the formula

x = Origin.X * (Radius * (Cos(Angle)))

y = Origin.Y * (Radius * (Sin(Angle)))

Then from those 4 points I can construct 4 lines which I can use to check for collision, and then perform Vector Reflection if a collision is made with the line.

I will probably end up making an object that can handle all square/rectangular objects, I just need to find the formula to calculate the base angles of the points on the square/rectangle.