obiekt ktory trzyma cienie:
GML (Create)
sizex = 32;
sizey = 32;
alpha = 0.5;
dir = 45;
px = lengthdir_x( sizey, dir - 90 );
py = lengthdir_y( sizey, dir - 90 );
global.shadow = d3d_model_create();
d3d_model_primitive_begin( global.shadow, pr_trianglefan );
d3d_model_vertex_texture_color( global.shadow, -sizex/2, 0, 0, 0, 1, c_black, alpha );
d3d_model_vertex_texture_color( global.shadow, sizex/2, 0, 0, 1, 1, c_black, alpha );
d3d_model_vertex_texture_color( global.shadow, px+sizex/2, py, 0, 1, 0, c_black, alpha );
d3d_model_vertex_texture_color( global.shadow, px-sizex/2, py, 0, 0, 0, c_black, alpha );
d3d_model_primitive_end( global.shadow );
gdzies w jakims obiekcie ktory musi miec cien
GML (Draw)
d3d_model_draw( global.shadow, x, y, 0, sprite_get_texture( sprite_index ) );
modele 3D mozna stosowac tez w 2D zwiekszajac predkosc rysowania, pomijajac zmudne obliczenia :)