r88 Collision Poly and Resize Button

0 favourites
  • 3 posts
From the Asset Store
Simple resize and rotate events for any sprite, quick and easy event sheet that you can use for your own projects.
  • Step to reproduce:

    • Create a Sprite
    • Load a texture (I tried with a 256x256)
    • Resize the texture via the resize button (I set it to 32x32)
    • Look a the collision polygon, still covering a 256x256 square.

    Seems weird since I thought collision polygon points were in Texture space. Anyway I had some weird random missing collision because of that.

  • This is by design: the collision mask follows the pixels, in accordance to whether you choose align topleft, center or stretch.

    Since if you resize align top-left and just trim off a few pixels, the collision mask should stay exactly where it is so it's still perfectly aligned with the image. If you resize and choose stretch, that's when the collision mask also scales down to fit the image. Do you think it should work differently?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Oh I see the resize function does a cropping unless I choose stretch (as it was a noise texture I didn't notice).

    But nonetheless, It's still kinda weird to keep the old big collision poly. Maybe it would be better to add another option that says "scale/trim/don't modify the collision polygon accordingly".

    I think for most case I would scale it. But it would at least make people aware of what the resize will do.

    As we don't see collision polygons by default we might miss the consequence of a resize and come across unexpected bugs.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)