SpriteGrabber reference points bug

Are SpriteGrabber’s reference points still bugged?
Is there a fix out there?
I’d love to get that working properly.
By the way, SpriteGrabber is awsome.
Thanks! [import]uid: 105206 topic_id: 20545 reply_id: 320545[/import]

been using SG since its release although I’ve never noticed the bug I seldom use ref. point with it could you explain the bug to me
and yes I agree for spritesheets SG is much easier to use. [import]uid: 7911 topic_id: 20545 reply_id: 80643[/import]

i’ve used it a lot but recently i started having the following problem.

when you use sprite:show(x, y, scale, ref) i seems that it is ignoring the ref value i pass.

even though i write “tl”, the sprite appears as if it’s ref point is center.
what’s more the image seems to be positioning somewhere else.
maybe it’s not a SG issue.
but it’s really strange since i have already used it a lot and never gave problems before.
is there something i must consider when using storyboard and SG? (using storyboard is the only thing that changed in my project, besides installing yesterday’s daily build).

I have absolutely no idea of what’s causing this

MORE EXPLANATION:
i’m loading with SG a sprite which consists of a 100x100 square image. the original file for that sprite is a 1024x768 png where everything is transparent except for the top right corner where this square is located.
I then create the spritesheet with texturepacker.
after this, i load the sprite with sprite grabber.
if x and y positions of the sprite are 0, and its reference point is top left, the square should appear well positioned in the top right corner of my screen (lanscaped ipad).
what appears on screen is the square but centered.

any idea??
[import]uid: 105206 topic_id: 20545 reply_id: 80646[/import]

I’m not at comp at this time but
are you on Mac or pc and what version of corona you using? have you tried an older version of corona? I know that I used the ref. point a long time ago and it seemed to work [import]uid: 7911 topic_id: 20545 reply_id: 80650[/import]

@nml

Hi, there!

Yes, the bug you are referring to is still a …bug.

However, this isn’t a SpriteGrabber bug!
It is a known SDK bug (internal issue: 1772) for which I cannot do anything.
http://developer.anscamobile.com/forum/2010/10/27/spritesheet-setreferencepoint-shifted-sprites

Or maybe I can do something…
Let’s say you want to place a sprite at 100,150 with TL ref point (Its top left point will be at 100,150). In my projects, I am handling such a task like this:
[lua]sprite.x = math.floor(100 + (50 / 100) * sprite.contentWidth)
sprite.y = math.floor(150 + (50 / 100) * sprite.contentHeight)[/lua]

Also look at object.contentBounds.xMin/xMax/yMin/yMax methods in the SDK API to position an object in relation to an other.

Hope that helps…

PS: Please ask any future questions about SpriteGrabber in its own threads, which I regularly visit.
http://developer.anscamobile.com/code/spritegrabber-spritesheets-two-lines
http://developer.anscamobile.com/forum/2010/10/29/spritegrabber-class-spritesheets-2-lines

Thanks jStrahan! [import]uid: 7356 topic_id: 20545 reply_id: 84193[/import]

thanks for your answers
right now i can’t remember how i solved it, but i figured it out some way.
I will use what you told me Magenda, that’s a good way to get it done!

Awesome module you created here! Thanks for all your hard work

[import]uid: 105206 topic_id: 20545 reply_id: 84439[/import]