Skip to content

[Platformer] The character sometimes decelerates at slope junctions #3013

@D8H

Description

@D8H

Describe the bug

At slope junctions, the character decelerates as if it collides an obstacle and continue without the velocity it has.

To Reproduce

Steps to reproduce the behavior:

  1. Climb the slop
  2. Look at the "Moving/Not Moving" label
  3. At slope junction, it will probably switch to "Not Moving"
  4. The character decelerate as if it collides an obstacle and continue without the velocity it has.
  5. It's a bit random depending on the position the character has when it collides the other platform

https://www.dropbox.com/s/4pb6kiav6qeilck/PlatformTest.zip?dl=1

Other details

  • Windows 10 and electron
  • GDevelop beta 155 but this is not a regression

Solution

  • An easy fix would be to use the same margin as for platform following Math.abs(this._requestedDeltaX * this._slopeClimbingFactor). This would make a regression that let the character passes some small cliff which is a less important issue (a feature maybe?) in my opinion.
  • The behavior could look at the intersection of platform hitboxes, calculate the angle between the intersection edges and decide if it's a slope or a wall.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions