Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop5:objects:sprite:edit-points [2019/07/03 04:27]
piyushpalawat99 [Adding new points]
gdevelop5:objects:sprite:edit-points [2019/10/05 19:15]
4ian [Editing the default origin and center points]
Line 1: Line 1:
 # Edit Points # 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"​.+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. Center of the sprite lies at the halves of the dimensions of the image.+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 ​of the image with respect to the origin of the image will lie at (50, 50), i.e. (100/2, 100/2).+<note tip>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 centerwith respect to the origin of the imagewill lie at (50, 50), i.e. (100/2, 100/2).</​note>​
  
-##Adding new points+## Adding new points
  
 Below all the animations, there is an Edit Points option. Below all the animations, there is an Edit Points option.
Line 26: Line 27:
  
 {{ :​gdevelop5:​objects:​sprite:​annotation_2019-07-02_184800.png?​nolink |}} {{ :​gdevelop5:​objects:​sprite:​annotation_2019-07-02_184800.png?​nolink |}}
 +
 +## 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:
 +
 +{{ :​gdevelop5:​objects:​sprite:​screenshot_2019-10-05_18.08.54.png?​nolink |}}
 +