d3d_transform_add_translation(xt, yt, zt)
Argument | Description |
---|---|
xt | The x component of the transform vector. |
yt | The y component of the transform vector. |
zt | The z component of the transform vector. |
Returns: N/A
As the name implies, this does not set an absolute translation
value to the object, but rather adds the amount of the vector onto
the current transform (unlike d3d_transform_set_translation
which sets an absolute position).
var tex = background_get_texture(bck_Wall);
d3d_transform_set_identity();
d3d_transform_add_translation(0, 200, 400);
d3d_draw_block(-50, -50, -50, 50, 50, 50, tex, 100, 100);
d3d_transform_set_identity();
The above code tells GameMaker: Studio to first go to (0,0,0) then add the translate vector (0,200,400) to the object in the game world, and then draw the block.