Component for Quintus Game Engine that prevents an sprite going outside the X axis of a level (layer) generated with Tiled. One of the layers needs to have a box attribute. And the box component uses the sprite's collision points.
If you are not using a tiled map, you can set a box property with a "maxX" attribute to the sprite.
Tested a few times and it works, even if you scale the sprite.