This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sd_seg_in_plane(_r0, _r1, _plane) | |
{ | |
var _ab = vec3_subtract(_r0, _r1); | |
var _pn = sd_plane_get_normal(_plane); | |
var _pd = sd_plane_get_distance(_plane); | |
var _t = (_pd - vec3_dot(_pn, _r0)) / vec3_dot(_pn, _ab); | |
if(_t >= 0 and _t <= 1) | |
{ | |
var _q = vec3_add(_r0, vec3_scale(_ab, _t)); | |
return sd_collision_return(true, _plane, _q); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function __trace() | |
{ | |
var _r:string = ""; | |
for(var i = 0; i < argument_count; i++) | |
{ | |
_r += string(argument[i]); | |
} | |
show_debug_message(_r); | |
} |