Ignoring bounding box

Hi, I have two irregularly shaped actors, an example of one is attached. I set the two actors to collide but the bounding boxes collide before the visible images do. So the game stops with the actors still visibly apart but the bounding boxes are touching, which just looks tacky. As you can see with the cloud image, I have set it to have a transparent background. But this doesn't work because the background still exists in the bounding box. Does any one know of anyway i can program gamesalad to ignore the bounding box in which the actor is placed? Or fit the bounding box to the irregular shape. Or potentially a way i can use photoshop or another image editor to remove an image from its bounding box so it no longer exists?
Many Thanks

Comments

  • frdfrd Member Posts: 191

    You can change the collision shape of an actor to circular instead of rectangular in the actors preferences. This makes a circle based on the smaller dimension of the actor, so in a rectangular shape like your cloud the circle would reach the full height but only part of the way across the width. Like this -

    This might work for what you want. Alternatively you can create invisible rectangular actors which you position on your cloud and constrain to its' position. These invisible actors become the collision shape. Like this -

    There is no way to get the exact shape of the actor to become its' collision shape I don't think.

  • SocksSocks London, UK.Member Posts: 12,822

    I think a few circles would be better than a few rectangular actors . . . .

  • frdfrd Member Posts: 191

    I didn't think of that, your example is definitely better.

  • SocksSocks London, UK.Member Posts: 12,822

    @frd said:
    I didn't think of that, your example is definitely better.

    Cheers, I also think these sorts of things are worth designing backwards, make your collision shape, then design your cloud to fit.

  • frdfrd Member Posts: 191

    That's also a great suggestion.

  • LovejoyLovejoy Member Posts: 2,078

    A circle collision would look like this

    The circle would actually become an ellipse. So just make your cloud accommodate the one circle collision shape and save yourself the trouble of multiple actors for such a simple thing.

    Fortuna Infortuna Forti Una

  • SocksSocks London, UK.Member Posts: 12,822
    edited September 2015

    @Lovejoy said:
    The circle would actually become an ellipse. So just make your cloud accommodate the one circle collision shape and save yourself the trouble of multiple actors for such a simple thing.

    Unfortunately circle collision shapes stay circular, they don't distort to become ellipses. A circular collision shape on that cloud actor would look like this:

  • LovejoyLovejoy Member Posts: 2,078

    @Socks said:

    hmm i could have sworn that it use to stretch with the image. But just tested it out and your right it didn't.

    Disregard my last comment.

    Fortuna Infortuna Forti Una

  • 7brownjack7brownjack Member, PRO Posts: 24

    Thank you all for the fantastic advice, i'll give it a go...

  • rvantilborgrvantilborg Member, PRO Posts: 185

    i struggled with this problem in the past, but now its easy:

    1.simply create a new actor and make it invisible.

    2.constrain that new invisible actor to the actor you want to have the collision on (to make sure they always move together) (in your example the 'cloud' actor)

    3,collide with the newly created and invisible actor instead of the cloud in your example

Sign In or Register to comment.