Collision Shape Moves Outside Character..?

Discussion in 'Technical Discussion' started by CoffeeNinja, Nov 5, 2016.

  1. CoffeeNinja

    CoffeeNinja Boxer

    Joined:
    Oct 8, 2016
    Messages:
    7
    Likes Received:
    0
    Hey everyone,

    I'm fairly new, but the new tutorial videos are awesome!
    Everything is going well except for a few things..

    Game is Platformer..

    For some reason, when I turn my character to run backwards (To the Left),
    (I have Image Direction checked)

    It all works well, but the collision shape moves outside of the character in front of him when running to the left. (Viewing in debug mode)
     
  2. CoffeeNinja

    CoffeeNinja Boxer

    Joined:
    Oct 8, 2016
    Messages:
    7
    Likes Received:
    0
    Yes.. I tried re-sizing my character animations in photoshop, added a NEW character.. dragged the IDLE image in ONLY.. adjusted the collision shapes and the character physics.. worked fine..

    UNTIL I selected the IMAGE DIRECTION checkbox under "Character Gameplay Settings".. then my collision shape (Hitbox) is outside in front of him ONLY when I run to the left.. (The Image Direction direction)

    So I UNCHECKED the IMAGE DIRECTION checkbox and previewsed my game in DEBUG MODE and it worked fine again. So I re-checked it so that when I run to the left (Platformer Game) I would see him turn to face the direction he was running. And sure enough.. the collision shape once again is outside the character to the left side when I run to the left. But it is normal when I run to the right.
     
  3. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    Do you have placed your character move animation in the middle at zero value vertically?
     
  4. CoffeeNinja

    CoffeeNinja Boxer

    Joined:
    Oct 8, 2016
    Messages:
    7
    Likes Received:
    0
    OH.. I think I see now.. I don't have my character at absolute zero, he is to the left of the center. So that makes sense why when it flips directions.. the collision shape would think it's on the character but be to the left where he stands. lol

    I'll let you know if I get it to work
     
  5. CoffeeNinja

    CoffeeNinja Boxer

    Joined:
    Oct 8, 2016
    Messages:
    7
    Likes Received:
    0
    Yup! Worked thanks.. Ha Ha.

    Question.. can the collision shape flip too? It stays on him but it doesn't flip like the character. Did I obviously miss something?
     
  6. CoffeeNinja

    CoffeeNinja Boxer

    Joined:
    Oct 8, 2016
    Messages:
    7
    Likes Received:
    0
    I guess it's not super important, he's a human, it just sticks out on one side.. so it's not exactly the same when he switches directions.. Unless there is a way I won't worry about it..
     

Share This Page