Category: Images and Rendering
SetSpriteHotspot(spriteReference As Integer, x As Integer, y As Integer)
Void
Sets the draw hotspot of a loaded sprite in pixels.
After this call, DrawSprite and DrawSpriteEx use the supplied x and y hotspot for every frame in the sprite sheet.
The hotspot may be negative or outside the frame bounds. New sprites start with a hotspot of 0, 0.
hero = LoadSprite("player.png", 32, 32)
SetSpriteHotspot(hero, 16, 24)
DrawSprite(hero, 0, 100, 200)