Offset Colliosion Shape Issue Using Image Direction.

Discussion in 'Technical Discussion' started by Phill Mason, Feb 22, 2016.

  1. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Hey folks, I've just noticed that when you have the characters 'Image Direction' selected, the collision shape of the character is way off to the left when you face the character that way. I've setup the collision shape of this soldier character in the middle of the body, but when I turn left, it's sticking out of the left of the body.

    I set it up in the demo platformer to double check it wasn't something I did, but it's the same in that too. Is this a known bug @Andy?

    Offset-Collision-Shape.jpg
     
  2. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    BB1 can't change the collision shape (including flipping it). There are several things you can do.

    1) Make sure the collision is centered in the actual image so that flipping it won't matter. (doesn't really apply here)

    2) Build the character from separate images in the animation editor. (make the gun separate in your case)

    3) use connections to build the character. (similar to #2)

    You'll have to experiment to see if you can get exactly what you want.
     
  3. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Thanks for the ideas @Andy, I didn't think about building the character in the animation editor, great idea. I would imagine that would also give me better collision shape control over each body part too. I actually purchased this soldier character online, as it came with a 'Spriter' file and I wanted to learn to animate in the software, so it made sense to get this little dude into the bargain, that's why he's dropped into BB2 as one object. I'll go and try your advice and see how I get on, thanks Andy.
     

Share This Page