The horizontal display origin of this Game Object. The origin is a normalized value between 0 and 1. The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.
The vertical display origin of this Game Object. The origin is a normalized value between 0 and 1. The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.
The horizontal origin of this Game Object. The origin maps the relationship between the size and position of the Game Object. The default value is 0.5, meaning all Game Objects are positioned based on their center. Setting the value to 0 means the position now relates to the left of the Game Object.
The vertical origin of this Game Object. The origin maps the relationship between the size and position of the Game Object. The default value is 0.5, meaning all Game Objects are positioned based on their center. Setting the value to 0 means the position now relates to the top of the Game Object.
Sets the origin of this Game Object.
The values are given in the range 0 to 1.
name | type | arguments | Default | description |
---|---|---|---|---|
x | number | <optional> | 0.5 |
The horizontal origin value. |
y | number | <optional> | x |
The vertical origin value. If not defined it will be set to the value of |
This Game Object instance.
Sets the origin of this Game Object based on the Pivot values in its Frame.
This Game Object instance.
Sets the display origin of this Game Object. The difference between this and setting the origin is that you can use pixel values for setting the display origin.
name | type | arguments | Default | description |
---|---|---|---|---|
x | number | <optional> | 0 |
The horizontal display origin value. |
y | number | <optional> | x |
The vertical display origin value. If not defined it will be set to the value of |
This Game Object instance.
Updates the Display Origin cached values internally stored on this Game Object. You don't usually call this directly, but it is exposed for edge-cases where you may.
This Game Object instance.