toto88x Posted March 29, 2016 Share Posted March 29, 2016 Hi, I'm wondering what's are the differences between anchor and pivot? And when should we use one over the other? Thanks! Link to comment Share on other sites More sharing options...
drhayes Posted March 30, 2016 Share Posted March 30, 2016 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. VitaZheltyakov 1 Link to comment Share on other sites More sharing options...
Recommended Posts