Asset - Scripts 2D Shape Intersection

Desix

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