Pixel-perfect collision for unscaled character

Started by felix42, Fri 20/06/2008 15:03:59

Previous topic - Next topic

felix42

Hi everyone!

I have a problem with some sprites with large transparent areas for my characters.
I've searched the forums and all i found was, that pixel-perfect clicks are a problem with scaled characters.
My characters are unscaled, so I understand this should work. UseRoomAreaScaling is false and I don't do any manual scaling, pixel-perfect clicks are turned on in the game setting, too (and working for objects).
Did I miss anything there? Won't this work with characters at all? (Would be very bad for our game).

Thanks in advance!

Pumaman


Dualnames

I get it. Pixel-perfect click collisions.
He used the module but the module doesn't work with scaled characters, but weird enough all his characters aren't scaled. He was room scaling disabled, and he ain't using manual scaling as well.

Or maybe he didn't use the module. He should then i guess.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Lt. Smash

where you prompted to wheter use alpha-layers when you imported your sprites?
If so try importing your sprites again but don't use alpha-layers.

Maybe you have such a layer for the fully transparent part around the sprite.
It seems that AGS can't handle alpha-layers for pixel-perfect click detection.

felix42

Ah yes, I'm using alpha for transparency.
I noticed i had "keep as is" for transparency color in the next window, so i changed this to upper-left pixel and now the click detection works. I can still use the alpha channel, though, but thanks for pointing me in the right direction!

SMF spam blocked by CleanTalk