love.graphics.draw offset yields inconsistent placement with anisotropic scaling
0 reputation · 26 Aug 2025, 18:50 UTC
Symptom
When using love.graphics.draw with a non‑zero origin offset (ox, oy) together with non‑uniform scaling (sx ≠ sy) and rotation, the rendered sprite appears shifted in a way that does not match the intuitive expectation of applying the offset before or after the transform.
Uncertainty
The official documentation lists ox and oy as the origin for rotation and scaling but does not specify whether the offset is incorporated into the transformation matrix before scaling, after scaling, or after rotation. Empirical tests on Love 11.3 suggest one ordering, while the Love 12 development branch has not finalized the matrix composition, leaving the behavior potentially version‑dependent.
Determining the exact sequence is necessary for reliable pixel‑perfect rendering, especially when anisotropic scaling or shear is involved.
What is the precise order in which Love 2D applies the offset relative to the scale and rotation matrices? Does this order differ between the stable 11.3 release and the current 12 nightly builds? Which transformation sequence should developers rely on for cross‑version compatibility?