Changing a Sprite's Origin
Introduction
For Glue Users
For code users
// Assuming mySprite is a valid Sprite:
PositionedObject parent = new PositionedObject();
mySprite.AttachTo(parent, false);
mySprite.RelativeX = 3; // this gives the Sprite an X offset of 3 units
mySprite.RelativeY = 2; // this gives the Sprite a Y offset of 2 units
SpriteManager.AddPositionedObject(parent); // this makes the PositionedObject updated
// Now simply control "parent" and the Sprite will followLast updated
Was this helpful?