How to convert 3D world coordinates to 2D GUI:
///@arg {vec3} position
var v = argument0;
var p = matrix_transform_vertex(matrix_get(matrix_world
),v[0],v[1],v[2]);
var cx = (p[0] / p[2] + 1) *.5 * view_wport[0];
var cy = (p[1] / p[2] + 1) *.5 * view_hport[0];
return [cx,cy];
@Dev_Smithy Several collision list scripts from the site are now improved native functions in GameMaker Studio. The scripts will probably be removed in a future update, though they have some use in GM:Studio v1.4.9999.
@smallbigsquare Yes. That script is not terribly fast. It uses a fairly naive randomized ear-clipping algorithm that was easy for me to understand. There are number of better algorithms based on monotone polygon decomposition. One even appears in Mark Overmars' Computational Geometry book.
@gmlscripts I think we've talked about this once, but if it is merely a rectangle (or other pointy shape), transforming the coordinates yourself is going to be cheaper than building matrices and a texture swap - my recent post had an over-extended formula https://t.co/h1mKrEEpNC