How to fit collsion polygon precisely to sprites?

Get help using Construct 2

Post » Thu Jul 19, 2012 8:30 pm

Hi guys, I'm wondering how to fit a collision polygon precisely to a sprite's actual shape instead of a square surrounding it, and how to cut off the background of the sprite itself because it's really annoying and ruining the whole game. Thanks a bunch!
Posts: 4
Reputation: 433

Post » Thu Jul 19, 2012 8:45 pm

For the first part, you have to edit the collision polygon yourself. See the manual article on the image editor.

For your second question, you have to do this in an image editor. You should make your graphics with transparent backgrounds, and save them as PNG's. Otherwise, you could so something like use the magic wand to delete the background.

Hope this helped!
Posts: 3,189
Reputation: 32,390

Post » Thu Jul 19, 2012 8:47 pm

Do you have some tool like or photoshop? To cut off the background of a sprite, you need to make the background transparent.

To fit a collision polygon to sprite:
Edit animations>Click set collision polygon icon>Right click sprite>Guess polygon shape

But, I generally don't recommend setting a custom collision polygon to a sprite; especially if it's shape is irregular.
Instead, pin an invisible sprite (a sprite that's completely transparent) to the general overall shape of a sprite (or have it mirror the object's x/y co-ords) and use that for condition chekcing with collisions.
Zelda Gamekit (my project)

Example capxs I have made:
Zelda-Style Inventory
Zelda Hearts System

The unwritten "How do I" capx etiquette! Nearly always provide a capx of the problem you have, and try to isolate the problem and/or no capx above 10 MB. :)
Posts: 438
Reputation: 16,456

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Eren, gomotion100, mindragon73, PatrikTT, Phoenixbowman, Solomon, Yahoo [Bot] and 6 guests