Category: Objects
/ Position
Since engine version: 1.0 OC
SetPosition
Description
Moves the object to the specified position. This will set the exact pixel position and any internal sub-pixel offsets will be reset.
Syntax
void SetPosition(int x, int y, bool check_bounds, int prec);
Parameters
- x:
- New X position of the object.
- y:
- New Y position of the object.
- check_bounds:
- [opt] Only applies to objects using the BorderBound property. Ensures that the position is always within the limits specified by the object.
- prec:
- [opt] Precision. Coordinates are divided by this value to enable movement to fractional positions. Defaults to 1.