Sets the transformation to a rotation around the axis indicated by the vector with the indicated amount.


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);

The above code tells GameMaker: Studio to rotate the object through the vector formed by (0,1,1) by an amount of 90 degrees.

Back: 3D Drawing
Next: d3d_transform_stack_clear
© Copyright YoYo Games Ltd. 2018 All Rights Reserved