Potential problem with bounding radius calculation.

11 views
Skip to first unread message

Kieran

unread,
Oct 8, 2011, 1:33:13 PM10/8/11
to Rabbyt
So; I've managed to generate a -very- strange case where occasionally,
for some sprites, the bounding radius is not calculated properly (when
I first spawn the sprite.)

I've only managed to make it occur on a single sprite that I'm using,
and only in some very special circumstances (if I spawn the sprite
when I already have ~1000 other sprites onscreen), but when I spawn a
string of said sprite, about half of them go to 2, the others sit
around 106.

When I bind the bounding radius to 106 before spawning the sprite, it
works perfectly; and I never manipulate the radius on a live sprite,
which leaves me quite confused.

If there's any information I could give to help define the problem
better, whether it be code/sprites/testing something, I'd be glad to
help.

Best,
-me

Kieran

unread,
Oct 8, 2011, 2:43:44 PM10/8/11
to Rabbyt
So, after a few hours of debugging I figured out what was wrong, (as
is usually the case, my code,) it turns out that if you set the
bounding on a sprite, then swap out the image, the bounding doesn't
reset to being found dynamically. In hindsight, this makes complete
sense.
Reply all
Reply to author
Forward
0 new messages