New games every week!
JSE - Collisions Blog
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 178, Upvotes 15  
Daily Blog , Jse
New games every week!
Site credits : Jayenkai made this.
(c) Jayenkai 2023 and onwards, RSS feed 80

Blog - JSE - Collisions - AGameAWeek