...Size a Transparent PNG in BB2?

Discussion in 'How Can I...?' started by rob_mabry, May 18, 2016.

  1. rob_mabry

    rob_mabry Boxer

    Joined:
    Oct 8, 2015
    Messages:
    4
    Likes Received:
    1
    Not sure if this is a bug, file format issue or something else. Whenever I add a transparent PNG file to BB2, it is sized extremely small and cannot be moved (except by typing in position) or sized (no handles to adjust). I am trying to use the transparent png as a detection area/image for an action object, but it is basically useless after being resized by BB2.
     
  2. playsgames6666

    playsgames6666 Miniboss Boxer

    Joined:
    Nov 13, 2015
    Messages:
    1,168
    Likes Received:
    745
    You need to add a image that is not transparent, then in BB change its opacity to zero, which will make your image transparent.
    And you can then resize it and move it around.
     
  3. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    That is because the collision area (and I guess the size of the sprite) is calculated automatically from the visible parts on your image. You can imagine if there is a small ball in a big transparent layer you just do not want to have the collision happening far away from your ball.

    @playsgames6666 already mentioned the workaround, but btw later on you can even delete that default animation as you only need the collision area really. The only disadvantage of that is that then to edit the collision area again you need to re-add an animation...
     
    playsgames6666 likes this.
  4. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    Hey guys, just so you know, we are working on a better solution here rather than resorting to a .01 opacity or similar hack (which works well though). It's tricky because sometimes we want to be able to select on transparent pixels and other times we might not want to.
     
    playsgames6666 likes this.
  5. rob_mabry

    rob_mabry Boxer

    Joined:
    Oct 8, 2015
    Messages:
    4
    Likes Received:
    1
    Thanks for the reply. It makes sense. Much appreciated.
     

Share This Page