d3d_transform_add_rotation_axis

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

Syntax:

d3d_transform_add_rotation_axis(xa, ya, za, angle)


ArgumentDescription
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


Description

With this function you can get GameMaker: Studio to add the defined angle rotation about the chosen vector to any previously set transforms.


Example:

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.


Back: 3D Drawing
Next: d3d_transform_stack_clear

© Copyright YoYo Games Ltd. 2018 All Rights Reserved