What are Origin and DisplayOrigin for a sprite?

Hello guys

I am struggling understanding what those 2 are, and how they differentiate.
The sprite is a simple Phaser.GameObject.Sprite with no physics.

Thanks!

1 Like

DisplayOriginX is in pixel relative to the width of the sprite.
OriginX is in percent relative the width of the sprite.

Example:
If your sprite is 120px width and you set the setDisplayOrigin(30), OriginX will be 0.25; DisplayOriginX will be 30.

3 Likes

Origin is normalized (0 to 1), DisplayOrigin is in pixel.

3 Likes

Thank you!