• 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!

Asset - Scripts 2D Shape Intersection

DesArts

Member


https://marketplace.yoyogames.com/assets/3192/shape-intersection

Shape Intersection allows you to know exactly where a line intersects with the edges of circles and rotated rectangles.

line_solid_intersection(x1, y1, x2, y2, exclude)
An array of all points is returned and the ids of the objects the points refer to are also included.

For use in any 2D or 3D game (only tests 2D shapes). Check if an enemy can see you! Know where a bullet hits instantly! No need for clunky slow pixel mask collision checks!

Usage instructions included in comments of script. This script is easy to implement for beginners and simple to customise.

No built in pixel collision functions.
No excessive loops.
Maths only.


Screenshot:
 
Top