sprite ai
Keep a disappearing sprite out of editor picking
If a character disappears by collapsing to zero width, its old position may remain clickable for exactly one exposure. Picking normally relies on an inverse transform to move a pointer into the character’s local box. In SFML 3.0.0, the inverse returned for a singular transform is identity. Treating that result as an ordinary inverse can make the old untransformed region react.
Replay a click through the vanish and return
Put a large diagnostic button or object behind the character and arrange for the silhouette to collapse along one axis. Use a recorded scene input pointing to the original local box so every run hits the same location. Test one update before collapse, during the zero-width exposure and on the first usable exposure after expansion.
Decide whether input should pass through to the object behind or be blocked while the transition is in progress. Store that choice in the state that drives picking, then keep the transform test as protection against unintended singular frames. Include a small but nonzero scale in the replay to confirm the input remains consistent on both sides of the transition. FrameSprite’s technical guide and test fixture explains the native inverse behavior.
Prepared by the FrameSprite Workflow Team with AI assistance. Examples are illustrative unless attributed to a linked fixture.