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


d3d_transform_set_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 define a vector and then have GameMaker: Studio transform the angle of the object by the amount specified through that vector.


var tex = background_get_texture(bck_Wall); d3d_transform_set_identity();
d3d_transform_set_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�.

Back: 3D Drawing
Next: d3d_transform_add_translation
© Copyright YoYo Games Ltd. 2015 All Rights Reserved