L
LV154
Guest
I know this topic has been discussed before, and the solution is usually that rotation comes before translation of the model. However other threads seem to focus on imported models.
My problem is a little different. I have created various objects that draw multiple things at once in the draw event.
Eg.
draw_set_color(c_white);
d3d_draw_block(x-16,y-16,z,x+16,y+26,z1,sprite_get_texture(block_spr,0),1,1);
draw_set_color(c_black);}
If I add a rotation command, the object rotates around the room axis. How can I translate it to its origin? If I use the code d3d_transform_add_translation(x,y,0) or the actual coordinates placed in the room, it just isn't there when the game runs. What am I doing wrong?
My problem is a little different. I have created various objects that draw multiple things at once in the draw event.
Eg.
draw_set_color(c_white);
d3d_draw_block(x-16,y-16,z,x+16,y+26,z1,sprite_get_texture(block_spr,0),1,1);
draw_set_color(c_black);}
If I add a rotation command, the object rotates around the room axis. How can I translate it to its origin? If I use the code d3d_transform_add_translation(x,y,0) or the actual coordinates placed in the room, it just isn't there when the game runs. What am I doing wrong?