Hi. I want to do following:
If player collides with an object, than the game should compare their size ( not just by height / width, but by the pixel count of anything that is not transparent )
Player is a square 10x10 pixels
Player collides with an object that is 9x9 pixels > player grows up by 10% of the size of the object.
Player collides with an object that is 10x11 pixels, player shrinks by 10% of the size of that object.
Player collides with an object that is 10x11 pixels, but 70% of the object is transparent, so player grows up by 10% of the size of that object.
So is there a way to get the actual size of the object and compare the values ?
I m sorry for reposting the same, but I have been trying to figure it out for last 3 days & I still dont know how to do it. It is really getting frustrating
Someone has suggested me the Canvas plugin, but I have no idea how to do what I am trying to do there.