Hi all,
I've got some code that shows a sprite and then hides it, yet it still is hittable when invisible:
// get mouse position
mouseX = GetPointerX()
mouseY = GetPointerY()
// check sprite under mouse
spriteHit = GetSpriteHit(mouseX, mouseY)
......
// centre sprite and make it visible
SetSpritePosition(g_sprchipBoard, (g_screen_width / 2) - (GetSpriteWidth(g_sprchipBoard) / 2), (g_screen_height / 2) - (GetSpriteHeight(g_sprchipBoard) / 2))
SetSpriteVisible(g_sprchipBoard, 1)
......
// hide sprite, make it not active
SetSpriteVisible(g_sprchipBoard, 0)
SetSpriteActive(g_sprchipBoard, 0)
.....
sprHit still detects the sprite, even though it's invisible and not active. What's the best way to remove the sprite so GetSpriteHit() doesn't detect it? I have solved it by repositioning it to -10000, -10000 but it seems hackey.