Character jumping on platform

Discussion in 'How Can I...?' started by trygiimusic, Nov 9, 2015.

  1. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
  2. HungaryBoy

    HungaryBoy Boxer

    Joined:
    Sep 30, 2015
    Messages:
    16
    Likes Received:
    4
  3. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
  4. Lee Fellows

    Lee Fellows Boxer

    Joined:
    Sep 25, 2015
    Messages:
    65
    Likes Received:
    40
    This is done using the oneway collision (within the collision shape editor)
    Looks like this https://www.buildbox.com/forum/inde...vailable-now-from-the-appstore.528/#post-3118
    And I explain a bit more here... https://www.buildbox.com/forum/inde...vailable-now-from-the-appstore.528/#post-3163
     
    trygiimusic likes this.
  5. trygii

    trygii Avid Boxer

    Joined:
    Oct 14, 2015
    Messages:
    307
    Likes Received:
    72
    @Lee Fellows I've just tested it and it worked, however, there's a problem. When my character touches the right side of the platform it just goes through, which I exactly what I want. But if it touches the left side of the platform it blocks the character. It's just a rectangle platform and I've made sure the one way collision is pointed up. Is this a bug or did I do something wrong?
     
  6. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    @trygiimusic check the collision shape of your characters jump animation. Is it the same as your character when he's not jumping? Perhaps it's in a totally different position. Play in debug mode to see where all the collisions are happening.
     
  7. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    I can confirm the same problem. I have no animation, just one single sprite. If the platform has the "one way collision" set upwards, so that it supposedly make collision only when jumping on top of it. However when you hit from the left side, it also collides, not from the right hand side though... Weird...

    My workaround was to change the collision shape to look like an inverted trapezoid. It came this solution into my head because I thought this way it is almost like you do not hit the platform exactly from its side but a little bit from below (the angle of the side is different). Apparently it works, maybe you need to tweak with the shape so it works reliable while not affecting your game noticeable.

    Screen Shot 2015-11-11 at 6.01.48 PM.png

    UPDATE: Ultimately you can end up with a triangle:
    Screen Shot 2015-11-11 at 6.12.53 PM.png
     
    Last edited: Nov 11, 2015
  8. Lee Fellows

    Lee Fellows Boxer

    Joined:
    Sep 25, 2015
    Messages:
    65
    Likes Received:
    40
    I used a thin collision shape, even though my platform was bigger ;)
    But my character was only jumping upwards, this may be tricky if you character can jump at different angles...
    try a thin collision shape and see if that helps... and let us all know what works best for you :)
    Also is your jump at different angles or is it a static upward jump like Cavern?
    But like the triangle idea with play with it next time I use one-way :)
     

Share This Page