d3d_transform_set_identity

Sets the transformation to the identity (no transformation).

Syntax:

d3d_transform_set_identity()


Returns: N/A


Description

This will set the origin of the 3D world to location 0,0,0 (which is the center of the world). This means that you can define an object at this point and then perform transforms on it to change its angle, scale, or position without worrying about the actual room coordinates. It is important to end transformation afterwards, using the same command.


Example:

d3d_transform_set_translation(100, 100, 10);
draw_sprite(spr, 0 ,0 ,0);
d3d_transform_set_identity();

The above code will draw a sprite translated to the position (100, 100, 0).


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