png image problem, please help

kipdevkipdev Member Posts: 275

Okay so ive saved an image with a checkered background, cropped as close to the edge of the image that i can. My problem is that in my game there is a rule that if the actor collides with the (png image) that i made the game is over, and the actor is running into a part of the png image that doesnt show. Please help me fix this. I want the actor to hit the images lines that show not the non visible part of the image. If it helps im using Photoshop for my images. Thanks in advance

Comments

  • Spalding004Spalding004 Member, BASIC Posts: 89
    edited June 2014

    Unfortunately, gamesalad does not support per-pixel collisions, which is what you are describing. The only thing I can think of would be to make that image just a template, and constrain invisible actors on top of it...though collision rules don't work all that well in constrained actors.

    Go ahead and try it and see if that works, it may be able to lead to a workaround.

    EDIT: Try changing the hitbox of the actor with the collision rules to be an ellipse, rather than a rectangle. That should take care of transparent corners, anyway.

  • kipdevkipdev Member Posts: 275

    The image comes in from the side of the screen and has to be avoided. Not sure what you mean by make the image a template , constrain and making invisible actors on top of it. Sorry im new lol

  • gingagaminggingagaming FREELANCE GS DEV Member Posts: 1,685

    What @spalding‌ quite rightly is saying is your actor (with displays you image) can only collide in the manner of a box or a circle. No other collision can be set inside gamesalad. You can however constrain more than one invisible actors together to for the shape of the collision (Just like drawing a picture out of only squares and circles) and then put the collision behaviour in these actors. This isn't an easy task for a noob but is the only solution to your collision problem. If you want to start on how to learn how to contain, take a look at this tutorial..

Sign In or Register to comment.