void showdebug() { while( 1 ) { vector lightpos = $fancylight.getWorldOrigin(); vector lightangtoup = sys.angToUp($fancylight.getAngles()); vector light_center = $fancylight.getVectorKey("light_center"); vector lightcentpos = lightpos + lightangtoup * light_center_z; vector lightrad = $fancylight.getVectorKey("light_radius"); //draw an arrow showing the pos and rot of the light sys.debugArrow('1 0 0', lightcentpos , lightpos , 2, 0.1 ); sys.debugBounds('0.2 0.2 0.2', ( lightpos - (lightrad*0.5) ) , ( lightpos + (lightrad*0.5) ) , 0.1 ); sys.wait(0.1); } } void main() { showdebug(); }