d3d_set_perspective

Switches on or off perspective projection.

Syntax:

d3d_set_perspective(enable)


Argument Description
enable Enables (true) or disables (false) perspective projection


Returns: N/A


Description

This turns on (or off) perspective projection. With a perspective projection instances that have a greater depth will appear smaller, so when the depth is 0 it is equal to the original size and the viewpoint for the camera is placed at a distance above the room. This default distance is equal to the width of the room as that gives a reasonable starting projection, and only instances in front of the camera are drawn. Don't use instances with a depth smaller than 0 (or at least not smaller than -w where w is the width of the room or the view).


Example:

d3d_set_perspective(true)

The above code switches on perspective projection.


Back: 3D Setup
Next: d3d_set_depth
© Copyright YoYo Games Ltd. 2018 All Rights Reserved