Sets the normalized origin point for the sprite named spriteName
. The default origin point is vector2(0,0)
which represents its upper left corner. vector2(0.5f, 0.5f)
represents the center of the sprite.
// origin in the middle of the button sprite SetSpriteOrigin("buttons/pauseButton.png", vector2(0.5f, 0.5f));
// origin in the lower right corner of the the button sprite SetSpriteOrigin("buttons/pauseButton.png", vector2(1.0f, 1.0f));