Weird interaction with slopes and player jumps (Bug #4127 "Work Around")

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • (Sorry for the repost - accidentally posted this in the construct 2 forum.)

    I recently just wrapped up my physics engine for my game... Only to realize that the slope physics are completely screwed up. I honestly have no idea why this is happening, I've made multiple platformers in construct and never had this problem. Basically whenever you Jump on a slope that's around this angle, the play character gets stuck in a jumping state even though they should be in their grounded state. Also, this isn't in the video but, sometimes they'll just not jump when at the edge of a slope object? I tested this with both solid square blocks that are rotated and custom slope sprites and they both seem to have the same problem. (See video for more info)

    Edit: i manged to fix both bugs so im posting it here in case anyone runs into the same issue. it was actually pretty simple i was just overthinking it. This might make for some weird edge cases but i havent noticed anything yet and it doesnt seem like it'll matter that much during actual gameplay.

    Also I'm not sure how possible this is but in the future i think it might be a good idea to have an option to disable/enable ledge snapping per solid if possible. I think that'd probably solve the issue of fixing this undoing the work toward preventing ledge snapping while probably also solving this issue. I don't know, though. It may not be worth it conisdering how easy this was to fix

  • Well you found one of the "funny" edge cases of the platformer behavior

    github.com/Scirra/Construct-bugs/issues/4127

  • Oh, that sucks. Is there no work around for this currently know? I'm going through the github comments and seems like Ashley wasn't able to find a fix. Which would only leave me with the option to get rid of slopes completely. And I *really* don't want to do that since I designed certain things around slopes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'd try to detect the broken state. If you manage to detect it, surely there's a way to knock the player out of it. Maybe shoving the player into or away from the slope a few pixels for a tick is all it needs.

  • I tried doing that with "is platform jumping and platform is on floor" and moving it a few pixels to the left or right based on whether or not the slope sprite is mirrored. No dice, though. I also have been trying LOS to detect whether the player is on a slope and then adjusting jump height that way but that wasn't working either. (However, this one just might be due to me not using LOS that much.) So IDK

    Edit: Also I'm not sure if that other bug I talked about where the player can't jump while going down a slope is somehow related to this or something on my end...

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