d3d_transform_set_scaling

Sets the transformation to a scaling with the indicated amounts.

Syntax:

d3d_transform_set_scaling(xs, ys, zs)


Argument Description
xs The x scale amount.
ys The y scale amount.
zs The z scale amount.


Returns: N/A


Description

A scaling transform will squash and expand the vertices of an object about the various axis. For example, a transform of d3d_transform_set_scaling( 1, 2, 0) will keep the same x coordinates, double the y coordinates and will all have the z coordinate of 0. This function sets an absolute scale and will wipe any previous transforms (unlike d3d_transform_add_scaling which will add to previous transforms).


Example:

var tex = background_get_texture(bck_Wall); d3d_transform_set_identity();
d3d_transform_set_scaling(2, 2, 2);
d3d_draw_block(-50, -50, -50, 50, 50, 50, tex, 100, 100);
d3d_transform_set_identity();

The above code tells GameMaker: Studio to draw the block scaled to twice the size.


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