Skip to main content

PGMMV Coordinates Plugin

Utilities for working with object coordinates

Help

This plugin provides utilities for working with 2D coordinates. Convert x and y
values to/from camera space and world space; test an object for positioning
within a tile or rectangle.

'In Tile' link condition quick reference:
|--------------|------------|------------|------------|------------|
|   Location   | X-Axis Cmp | X-Axis Val | Y-Axis Cmp | Y-Axis Val |
|--------------|------------|------------|------------|------------|
| Top Left     |     <      |    0.5     |     <      |    0.5     |
| Top          |    n/a     |    n/a     |     <      |    0.5     |
| Top Right    |     >      |    0.5     |     <      |    0.5     |
| Right        |     >      |    0.5     |    n/a     |    n/a     |
| Bottom Right |     >      |    0.5     |     >      |    0.5     |
| Bottom       |    n/a     |    n/a     |     >      |    0.5     |
| Bottom Left  |     <      |    0.5     |     >      |    0.5     |
| Left         |     <      |    0.5     |    n/a     |    n/a     |

Action Commands

NameDescriptionParameters
Camera to WorldConvert variables from camera to world coordinates.
NameValue
Input Variable SourceProject Common, Object Self, Parent Object
Input XVariableId
Input YVariableId
Output Variable SourceProject Common, Object Self, Parent Object
Output XVariableId
Output YVariableId
World to CameraConvert variables from world to camera coordinates.
NameValue
Input Variable SourceProject Common, Object Self, Parent Object
Input XVariableId
Input YVariableId
Output Variable SourceProject Common, Object Self, Parent Object
Output XVariableId
Output YVariableId

Link Conditions

NameDescriptionParameters
In RectangleTest if object instance position is within rectangle. Rectangle x & y coordinates correspond to top left.
NameValue
Rect Variable SourceProject Common, Object Self, Parent Object
XVariableId
YVariableId
WidthVariableId
HeightVariableId
On Tile EdgeTest if object instance position is located at a tile edge, along the x or y axis (default is both).
NameValue
AxisX, Y, Both
In TileTest object position in current tile. Tile origin (0,0) is top left, (1,1) is bottom right, and (0.5, 0.5) is center (default). The default comparator is '='.
NameValue
Variable SourceProject Common, Object Self, Parent Object
Comparison X<, <=, =, >=, >, !=
Origin XVariableId
Comparison Y<, <=, =, >=, >, !=
Origin YVariableId
In Tile (Horizontal)Test object position horizontally in current tile. Tile origin 0 is left, 1 is right, and 0.5 is center (default). The default comparator is '='.
NameValue
Variable SourceProject Common, Object Self, Parent Object
Comparison X<, <=, =, >=, >, !=
Origin XVariableId
In Tile (Vertical)Test object position vertically in current tile. Tile origin 0 is top, 1 is bottom, and 0.5 is center (default). The default comparator is '='.
NameValue
Variable SourceProject Common, Object Self, Parent Object
Comparison Y<, <=, =, >=, >, !=
Origin YVariableId