Skip to main content

The "vngen_perspective_modify_pos" Function

Syntax#

vngen_perspective_modify_pos(x, y, xoffset, yoffset, zoom, rot, strength, duration, [ease]);
ArgumentTypeDescription
xrealThe horizontal perspective position, where 0 is center
yrealThe vertical perspective position, where 0 is center
xoffsetrealThe horizontal perspective offset, or 'angle', where 0 is center
yoffsetrealThe vertical perspective offset, or 'angle', where 0 is center
zoomrealThe perspective zoom multiplier, where 1 is neutral
rotrealThe perspective rotation, in degrees
strengthrealThe parallax strength multiplier, or 'FOV', where 1 is default and 0 is no parallax
durationrealSets the length of the perspective transition, in seconds
[ease]integer/macroOptional: Sets the ease mode for the transition animation
note

Zoom is capped at a minimum of 0.005 to prevent errors. Lower values will be clamped to this value.

Description#

Applies a new position, orientation, and focal point to the global perspective while transitioning from previous properties over the input duration.

All modifications made with this script are permanent and will persist until another modification is performed.

See Macros & Keywords for a list of available ease modes.

Example#

vngen_event() {
vngen_perspective_modify_pos(0, 0, -50, 0, 1, 0, 1, 0.5, ease_quad_in_out);
}

This will center the perspective camera while offsetting the 'angle' 50 pixels to the left, effectively shifting scene elements to the right using parallax.