Jump to content

What's are the differences between anchor and pivot?


toto88x
 Share

Recommended Posts

Anchor sets the texture of a sprite relative to the sprite's position. Let's say a sprite has a texture that's 32px wide and 16px high. This sprite is positioned at (50, 60) and its anchor is (0, 0). The sprite's texture will go from 50 - 82 in the x, and 60 - 76 in the y. If the anchor was set to (0.5, 1), then the sprite's texture would go from (50 - 32 * 0.5) = 34 to (50 + 32 * 0.5) = 66 in the x, and (60 - 16 * 1) = 44 to (60 - 16 * 0) 60 in the y.

Pivot is what the sprite rotates around when you set its rotation.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...