New games every week!
JSE - Collisions
4th June 2021  
In the end, I just went for the simpler commands.

-=-=-

A bunch of new Collision Commands are now part of JSE.
They are, in the order listed in the command list..

CollideCircleToCircle(X1, Y1, Diameter1, X2, Y2, Diameter2)
CollidePointToCircle(PointX, PointY, CircleX, CircleY, Diameter)
CollideRectToRect(X1, Y1, Width1, Height1, X2, Y2, Width2, Height2)
CollidePointToRect(PointX, PointY, X1, Y1, Width1, Height1)
CollideRectToCircle(X1, Y1, Width1, Height1, X2, Y2, Diameter2)
CollideCrossToCircle(X1, Y1, Width1, Height1, X2, Y2, Diameter2)
CollideLineToLine(X1,Y1, X2,Y2, X3,Y3, X4,Y4)

You can see examples in the Command List

You'll have to take care of all the scaling and whatnot yourself. I couldn't honestly think of a neater way to do it, I'm afraid.
Every other method had good points, but also lots of bad points, so instead of trying to second-guess the person writing the code, I opted to just leave be, and let them figure everything out for themselves.

Hopefully it's all good.
Be sure to let me know how you get on.

Views 84, Upvotes 1
Daily Blog , Jse
New games every week!
Site credits : All of the above : Jayenkai
(c) Jayenkai 2017 and onwards, site design Rychan. RSS feed
Blog - JSE - Collisions - AGameAWeek