Bounding box problem

Post your own tutorials, guides and demos.

Post » Sun Jan 04, 2009 11:46 pm

Hello everyone.

I was fiddling with Platform behavior and found something strange. I created a solid object, some platforms and an object with platform behavior. When it's collision mode is set to Per pixel - everything works as expected (I spawned a lot of objects with platform behavior to make the demonstration more obvious):

Setting collisions to Point also works fine:

However, when I set collisions to bounding box, I get strange results:

It seems to happen regardless of what objects are used, so the chances that I messed up something in either platforming object's of ground's settings are pretty low:

It only happens with left slopes, though. Right slopes are fine:


Also there's definitely something I don't know about Platform behaviour. If you run the included .cap file with collision modes for PlayerParticle (small blue circle) and OtherPlayerParticle (bigger red circle) set to Per-pixel you'll notice that blue ones can climb pretty steep slopes, while red ones are stopped by those slopes, however, they can still climb gentler slopes. Probably that has to do with the original sprites' sizes.

There's another problem with the included file. I somehow managed to get rid of Ladder_left's icon (this probably happened when I tried to edit it manually, which in turn happened because the icon didn't update when the image changed. You can see an example of this behavior in CurvedSolid's icon - it is considerably different from the sprite itself, and in fact represents the previous version of this sprite). Not only this icon doesn't show in object list, it completely messes up the icons in the event wizard. I think it skips over non-existing icon, so n+1st object's icon gets assigned to the nth object.
B
4
G
4
Posts: 65
Reputation: 1,305

Post » Mon Jan 05, 2009 12:03 am

Looks like a bug in the box-on-fine-collision test. For now, just use per pixel for both as a workaround - the performance is still very good with per pixel.

Can you submit it as a bug to the tracker?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Mon Jan 05, 2009 12:22 pm

Done! (Request ID 2487638)
I fail to reproduce the problem with object icons, unfortunately. It remains exclusive for the .cap file I uploaded in this thread. (and files this one was derived from) I'll post more about it if I manage to reproduce it.
B
4
G
4
Posts: 65
Reputation: 1,305


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 3 guests