d3d_transform_add_rotation_axis(xa, ya, za, angle)
Argument | Description |
---|---|
xa | The x component of the transform vector. |
ya | The y component of the transform vector. |
za | The z component of the transform vector. |
angle | The angle to rotate the transform through the vector. |
Returns: N/A
With this function you can get GameMaker: Studio to add the defined angle rotation about the chosen vector to any previously set transforms.
var tex = background_get_texture(bck_Wall);
d3d_transform_set_identity();
d3d_transform_add_rotation_axis(0, 1, 1, 90);
d3d_draw_block(-50, -50, -50, 50, 50, 50, tex, 100, 100);
d3d_transform_set_identity();
The above code tells GameMaker: Studio to rotate the object through the vector formed by (0,1,1) by an amount of 90 degrees.