[SOLVED] Rounded shape with transparant background problem
niksen
Member, PRO Posts: 6
Hello, I just finished my game, but my game was not perfect because it has a problem with the actor.
The image of actor is PNG file with transparant background, the image shape is rounded. The problem is when the actor collide with another actor, its collided with the transparant backround, not with the image shape (See my attachment). How the solution?
This is the link https://play.google.com/store/apps/details?id=com.nxnart.misterballoon
Thank You
Comments
Hi @niksen I really like your graphics.
At the moment, collision detection is only with square or circle (selected in the actor's Attributes > Physics > Collision Shape > Rectangle-or-Circle). We might be given the option of irregular shaped collision sometime in the future.
The workaround is to make a series of smaller transparent actors for collision detection, overlaid on your actor - your balloon in this case - all of them following the movements/positioning of the balloon by using Constrain Attribute behaviours with distance offsets.
So in this case, probably 3 transparent actors used; here's an example of how they're overlaid:
P.S the circular one indicated is still a square actor but with its collision shape set to Circle as prev. explained.
If you need any more help with the constrain and offset stuff, ask away and I'll explain that for you.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
@gyroscope Wow.. Thank you for taking the time to help answer my question.. problem solved..