Edit Points

Points in GDevelop are reference locations that can be used to refer to the specific location with respect to the object. The default points for a sprite object are “Origin” and “Center”:

  • Origin of the sprite is the top-left corner of the sprite image. This is the point that is used to position the image of the sprite object on the scene.
  • Center of the sprite lies at the halves of the dimensions of the image (by default, but this can be changed). The center point, also called “anchor” or “pivot” in other game engines, is the point around which the image is rotating or flipping.
For example, if a sprite image is 100 x 100 pixels in dimensions, the origin of the image will lie at (0, 0) of the image, i.e. in the top-left corner of the image. The center, with respect to the origin of the image, will lie at (50, 50), i.e. (100/2, 100/2).

Adding new points

Below all the animations, there is an Edit Points option.

Clicking on this option opens up a new dialog, in which, coordinates for the origin and the center of the sprite are already filled.

You can add points using the + symbol in the bottom right of the dialog. These points can be used as references for different actions. You can see an example here.

To add unique points for different animations of the same sprite, disable the “Share same points for all animations” option.

To add unique points for different instances of the same sprite, disable the “Share same points for all sprites of this animation” option.

Editing the default origin and center points

If the sprite images are not centered, or the image should rotate around a specific position, you can change the position of the origin and center point. By default, the center point position is automatically computed. If you want to change its position, click on the Pen icon next to it: