now that's cool and everything, for basic ractangles, but i want mine to be tilted (angled, whatever) and so i have four vectors calculated (junctions of a rectangle) on the run and drawn on screen - like so:
http://www.youtube.com/watch?v=r9G1NvWJjvo
(may not be processed just yet)
so, now i could go and just draw a lines from each junction to next one, but how could i, let's say fill that area? or - use angled collision rectangle?
is there any way i could save vector x and y in ONE variable and used as, let's say x1 in draw_rectangle method or it's something else?
some code i use:
step event of drawing object:
CODE
junction1_x=lengthdir_x(32,direction+135);
junction1_y=lengthdir_y(32,direction+135);
junction2_x=lengthdir_x(32,direction+225);
junction2_y=lengthdir_y(32,direction+225);
junction3_x=lengthdir_x(32,direction+315);
junction3_y=lengthdir_y(32,direction+315);
junction4_x=lengthdir_x(32,direction+45);
junction4_y=lengthdir_y(32,direction+45);
direction+=5;
junction1_y=lengthdir_y(32,direction+135);
junction2_x=lengthdir_x(32,direction+225);
junction2_y=lengthdir_y(32,direction+225);
junction3_x=lengthdir_x(32,direction+315);
junction3_y=lengthdir_y(32,direction+315);
junction4_x=lengthdir_x(32,direction+45);
junction4_y=lengthdir_y(32,direction+45);
direction+=5;
draw event:
CODE
draw_sprite(centre,0,x,y);
draw_sprite(drawJunction1,0,x+junction1_x,y+junction1_y);
draw_sprite(drawJunction2,0,x+junction2_x,y+junction2_y);
draw_sprite(drawJunction3,0,x+junction3_x,y+junction3_y);
draw_sprite(drawJunction4,0,x+junction4_x,y+junction4_y);
draw_sprite(drawJunction1,0,x+junction1_x,y+junction1_y);
draw_sprite(drawJunction2,0,x+junction2_x,y+junction2_y);
draw_sprite(drawJunction3,0,x+junction3_x,y+junction3_y);
draw_sprite(drawJunction4,0,x+junction4_x,y+junction4_y);
