Platform Behavior - Not detecting landing on Slopes

0 favourites
  • 15 posts
From the Asset Store
John is a fearless pirate and has ventured to seek treasure in uncharted lands
  • Problem Description

    The platform Behavior does not detect landing if the platform did not switch to fall.

    If you run towards a slope that is higher than the player and you jump and land on the slope without the platform behavior switching to "falling" it does not switch to "landing"

    Platform switches directly from jumping to moving.

    It should be jumping -> falling -> landing -> moving

    Attach a Capx

    Ashley : i cannot expose my Capx to the open forums.

    Description of Capx

    The Capx does a lot of things. It contains a fight system. Enemies. Levels etc.

    Steps to Reproduce Bug

    • Step 1 - Run towards a slope that is higher than the player for example a house roof
    • Step 2 - Jump on the roof from close proximity

    Observed Result

    Animations cannot trigger properly because the platform behavior never detected it was landing.

    Expected Result

    The platform behavior must switch to falling if it was in a jumping state but collides with a solid.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Win7 64bit

    Construct 2 Version ID

    168 32Bit

  • Please reproduce the problem in a new empty .capx that you can share otherwise we will not be able to investigate the report.

  • Ashley

    Capx attached.

    If possible please implement if Platform is jumping and on floor - force platform state to landing (or falling)

    To reproduce jump on the angle slope solid at the start.

    The animation should turn green indicating "jumping animation"

    If you hit the slope at the right or wrong angle it should stay on the jump animation because the behavior does not change state

    https://www.dropbox.com/s/h8rfsgx8yj1ggvt/Platform%20Bug.capx

  • Closing as not a bug. The landing animation has the origin in a different place, which causes it to bump up and down when it lands confusing the movement as to whether it's in the air or on the floor. You should use a single rectangular non-animated object with the platform behavior as described in this tutorial, and place any animating objects on top of it to ensure this problem does not occur.

  • Ashley

    The bug i reported is not about glitchy animations.

    Its about the state of the platform behavior.

    The platform does not switch to landing or falling.

    And in my working capx i did follow the tutorial or guidelines.

    If you run the debug you will see it clearly not switching triggers or states.

  • Ashley

    Here is a new CAPX with your requirements met.

    The bug i am reporting is in relation to the platform animation mode.

    https://www.dropbox.com/s/4tnmjrvrodlkwul/Platform%20Bug%20%282%29.capx

    Example. Here i am not pressing any key. The platform is stopped but the animation mode is still showing "falling"

    Sometimes it does not even go to falling. It goes straight to Moving. Skipping Falling and Landing.

    The PlayerHelper which is the platformer behavior goes from - Moving -> Jumping -> Moving

    When this happens the animations do not trigger properly.

    It should be forced that if Moving -> jumping -> moving force landing or falling at least.

  • Ldk - it looks like it's working fine here, what's the problem exactly? I noticed you accidentally have the platform behavior on both objects which is wrong and might be confusing you in the debugger.

  • Ashley

    The issue is that if the plaformer did not switch to falling state, it goes directly to moving state when on ground.

    The issue is also not a definite every single time issue. It only happens when you hit the slope while you are in a jumping state.

    When this happens, that you are now on the floor while the platformer was in jumping state, then the state changes to moving.

    It takes a few tries to get the issue to show because majority of the time the platformer has a few pixels before it hits the slope. If this is true then it does switch from the jumping state to the falling state.

    But there are instances where the slope is just at the height required to jump onto without ever actually falling before landing on it.

    The picture should roughly indicate what i am trying to explain.

    If there is a workaround i could use that. But right now my game is 4 weeks away from being launched on multiple platforms and my only option at this point is to remove any assets containing slopes like houses, cave entrances and vehicles. Something i really wish to avoid.

  • Ashley

    Ok i added a variable. If player is on floor then set to true else set to false.

    What happens is that in the scenario described above in the right side picture, the platformer does not detect it is on the floor when the bug occurs.

    Here is a screenshot where the player is on the floor but the behavior does not detect this

    https://www.dropbox.com/s/njgy5pisd1lap45/Platform%20BugV2.capx

  • Ashley

    Has it been confirmed yet that this is a bug?

    What are the chances of this being fixed in the next release?

  • Ldk - I see what you mean now, it doesn't correctly register floor detection in some cases which also affects the animations. I think this is fixed for the next build, please confirm when r171 is out (should be today hopefully).

  • Ashley

    Awesome. Thank you. Will test once the new build is available

  • Ashley

    It did fix it however it introduced a new bug.

    Tested using my game and also the same capx i posted here.

    The platformer cannot always jump while running up a slope. Even if the slope is at a very slight angle.

    However running down the slope it can still jump.

    What i found in the debugger

    The platformer behavior stays on moving and on floor.

    The sprite triggers "falling" animation. This makes me think that perhaps for a fraction of a microsecond the behavior "jumped" but switched immediately to on floor which then triggers the landing animation.

    I really appreciate all your assistance and hard work.

    Thank you.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ldk - could you make a separate bug report with full details again including reproduction .capx?

  • Will do

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)