Player falling through platform glitch....

0 favourites
From the Asset Store
Players follower. use it for anything which follows the player
  • Ive been struggling with this issue for while now and really need some help on this. I've got a glitch in my game where my player goes through platforms for some reason.

    I had an issue with my autorunner where my player kept moving to the left when running off a platform, i managed to solve this by setting my players X position when they are falling (line 16). But after doing this, my player starts to go through platforms and i have no idea why.

    When i delete the event i created, the glitch doesn't happen, it works as it should. I don't know why it's doing this and would appriciate help on fixing this issue.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Anyone? Sorry to bump this but I could do with some help....

  • As people have tried to explain before, setting the x coordinate while falling causes the glitch, because it overwrites the normal falling behaviour..

    So what you are saying is you have solved something by adding a bigger problem..

    What I would try to do is to really solve the first issue instead of trying to solve the problem you created while trying to solve the first issue..

  • I've mentioned previously that i have been struggling with an issue with my player moving to the left when falling, and unfortunately no-one has been able to come up with a solution (although many have been helpful enough to try, which is appriciated)

    This was the only method i could find that would work, but it has created other problems like you said, which i was hoping could be fixed. I don't see anything wrong with asking for help with that...

    I've added my old capx without the changes, where the issue is with the player moving back when falling. If this issue can be solve then that would be great, but as i've mentioned, i've not been able to find a solution yet.

  • What kind of glitch? I don't see any glitch with line16 removed? It seems to work normally as an auto-runner supposed to... Are you expecting the runner not to move towards left when it collide solid object?

  • I've mentioned in the first post that the glitch doesn't occur with line 16 removed.

    The reason i added line 16 is because i had an issue with my player moving to the left to the screen/going back each time you drop/fall off the platform. If you continously do this, eventually the player will end up on the edge of the screen.

    Unfortunately, with line 16 added, the glitch with my player falling through platform occurs.

    The 1st capx i posted has the glitch with falling through platforms. The 2nd capx i posted just the same as the 1st capx except without line 16, so the issue with that one is my player moving towards the left of the screen when falling of a platform.

    I basically want to solve the issue of my player moving towards the left of the screen when falling of a platform.

  • If you continuously do this, eventually the player will end up on the edge of the screen.

    Hmm, I thought this was supposed to happen? My impression that it is not a glitch because this is what I normally see in runner game.

    Mind if I ask what supposed to happen when player fall and hit the platform-side?

  • When the player runs or falls off the platform, they shouldn't move left or right, the X position should stay fixed so that doesn't happen.

    In my game, when you fall off, my player moves to the left of the screen, which it shouldn't do. It should stay in the same X position.

    I tried to fix this by creating an event that sets my player's X manually when falling, and although this worked, my player starts going through platforms which is the glitch I'm refering to in the 1st capx.

  • like DuckfaceNinja I actually don't see what is wrong with the second capx you posted..

    Looks like all is working as would be expected..

  • I don't get why you can't see the problem, the issue is there with the 2nd capx as I've just tested again.

    What happens is when my player falls of a platform (without jumping), it moves gradually to the left of the screen. When the player jumps, it's fine, its only when you let the player fall/run off the platform that this happens.

    It's a slight movement but i have double jump so if you just fall/run off the platform and then jump in mid air and land on a platform and do it continuously, you'll see the player getting closer and closer to the left of the screen.

  • When the player runs or falls off the platform, they shouldn't move left or right, the X position should stay fixed so that doesn't happen.

    In my game, when you fall off, my player moves to the left of the screen, which it shouldn't do. It should stay in the same X position.

    I tried to fix this by creating an event that sets my player's X manually when falling, and although this worked, my player starts going through platforms which is the glitch I'm refering to in the 1st capx.

    I don't even understand..... hmmm if the player is not supposed to go to the left upon falling, you mean the platform should stop moving? You have to choose either a) or b):

    a) player move left upon falling, platform keep moving

    b) player stay at current x, platform stop moving

    assuming you choose b), look at my capx, hope it gives you something. Btw, line 12 is wrong, i've corrected it, didn't check everything in detail, line 12 just too obvious.

    Line 16 is to do b)

    Line 17 is just added to see whether you want things to proceed running if it is not falling.

    [attachment=0:151iniov][/attachment:151iniov]

    PS: option c) player stay at current x AND platform keep moving AND no glitch >>>>>> IMPOSSIBBBRUUUU!!

  • Right...... OK, obviously i've not made my issue clear enough to understand what i'm on about so lets try some visual aids, maybe that help explain what i'm refering to.

    This is what i'm talking about. This is from my 2nd capx. Do you notice how each time the player drops, the player moves closer and closer to the left? The player ends up at the edge of the screen... This is what i want to FIX.

    Note the difference with this example, where the player drops but does NOT move to the left and end up at the edge of the screen? This IS how i want it.

    (Apologies for the quality, should be OK though)

    I tried fixing this issue on the 1st capx i posted by setting the player's X (which is line 16 in the capx), but ended up with a glitch where the player moves through platforms. Judging by the feedback,I'm guessing this is the wrong way to go about it, so i'm looking for a solution to the problem above, where the player moves to the left when falling.

    I hope thats made it clear and any help would be appriciated.

    [quote:sd7mcpke]Btw, line 12 is wrong, i've corrected it, didn't check everything in detail, line 12 just too obvious.

    This is from the Autorunner Template on Construct 2.

  • [quote:154bzbbx]Btw, line 12 is wrong, i've corrected it, didn't check everything in detail, line 12 just too obvious.

    This is from the Autorunner Template on Construct 2.

    Oh yeah! I stand corrected, It's different from my approach because I tend to Pick whatever I want to destroy. Learnt something today thanks.

    Back to topic:

    Aha! from your first video/gif it seems to behave like that in your pc, in mine it does not, weird. I dont think it's a bug, most probably it's your machine performance? Mind if you specify your machine spec, OS, browser you tested. I tested in all browser and all seems fine.

    Can you get your hand to other pc probably? Best thing I could suggest to help is try to export it, and run index.html. See whether it persist.

  • Windows 7 Ultimate 64 bit

    i7 860 2.80GHZ

    8GB DDR3 RAM

    I tested it on Google Chrome

    I doubt its my PC performance and also the same thing happens when i test it on CocoonJS Launcher.

    Just to make sure, the first gif is from the 2nd capx i posted. Both capx i posted have the same name i think (sorry) so it could be a little confusing if you downloaded both. I quite odd that i have this issue but you haven't.

    I've uploaded the capx again, so please try this and see.

  • Ah I tried tweak something in the official runner example, finally able to recreate it. It seems Line 9 (yours is Line 14) had to be modified to suit the speed. I can see the "hiccup to the left" when I change the speed from 300 to 1000, can see it quite obvious.

    Most probably this has something to do with dt multiplier.

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