In between two solids Character goes crazy

  • Hey guys,

    Presently I got a small problem.

    Player 1 pushes a solid until it reaches a limit (collides with a wall)

    Block and wall are same height therefore same collision height.

    Player 2 goes on top of the block and wall/floor, but in between both it register a fall. So it keeps jumping a few pixels and falling.

    I tried setting vectorY to 0 when overlapping both objects at the same time but nothing.

    Anyone knows a simple solution? Thanks!!

  • I ran up against this issue awhile back...but mine was a bit different in that I didn't have 2 solids up against each other with that gap. An idea I tried, which hopefully works here too, is setting your standing animation to be set by an overlap at offset (or, inversely, your falling animation set to the inverse of the overlap at offset). Once I did that my issue was fixed. I hope it helps here too.

    EDIT: I'd also put anything in the overlap check into a family (mine is simply called "solids")

  • Hey thanks! I tried that but with no luck.

  • Strangely, if I copy and paste the solid, which is a n enlarged tile that I use solely for collision purposes, is not registering the same problem. In debug mode Y Pos is equal. But a solid create of same height registers a lower Y pos for player.

  • It seems to be that when a Solid that can be pushed uses Platformer behaviour, when pushed towards another solid, it reacts weirdly. Even if after colliding with the other solid, I set Platform bevaviour to disabled in the pushed object, it still not working.

    Anyone has suggestions? I can always try to bypass this in a longer way, but Im curious if anyone had similar issues in the past.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Are you turning off the push when the solid collides with the wall?

    If not when the player is on top of the solid it is probably still pushing the solid.

    I would probably need to see a simple capx to understand what you are doing?

  • I can send a capx but the game is two players one requiring a controller to execute the actions and its a bit advanced.

    I tried turning off the Platform behaviour for the solid being pushed and in that case it works.

    I tried putting the pushed solid object next to another of same height. If Platform behaviour is turned off, then it stays at same height. If the behaviour is on then it seems to move one pixel up and one pixel in the opposite direction of the nearby solid.

  • I can send a capx but the game is two players one requiring a controller to execute the actions and its a bit advanced.

    I tried turning off the Platform behaviour for the solid being pushed and in that case it works.

    I tried putting the pushed solid object next to another of same height. If Platform behaviour is turned off, then it stays at same height. If the behaviour is on then it seems to move one pixel up and one pixel in the opposite direction of the nearby solid.

    OK what is the action you want to happen because sounds like turning it off solves the problem?

    I am having trouble visualizing what you are trying to accomplish without a capx sorry.

  • Link to the capx file. Player 2 pushes the box by pressing right and x button on a xbox controller.

    Player 1 is controlled using keyboard.

    I need to be able to push some solids and also for them to be able to fall. I tried disabling Platform behaviour but that as well wasn't working.

    https://drive.google.com/file/d/0B27TG57JCwl_UEpwY2VMeENSdE0/view?usp=sharing

    The problem is something like that (sorry for the quality)

  • OK, that didn't help because you are using plugins I don't use so I can't see the capx.

    Here is a capx to try. I don't know if it is what you are looking for and it uses physics and a blank sprite to turn physics on.

    https://www.dropbox.com/s/4nnqk7bzmtfc9k1/Push%20Block.capx?dl=0

  • Hey there,

    I've got your file. Your controls feel really great and tight (I love the way the player feels), but the actual scheme is pretty complicated, since they're all triggered by variables, so it might take some time for me to get through everything. I've got 2 final papers I need to finish but I'll take a look as soon as I can. One thing I noticed immediately is that the issue only starts to happen when the player is moving to the left, so maybe that info is somehow helpful?

    Sorry I can't get to it sooner!

  • Thanks guys.

    I'm trying to avoid the physics plugin though. The problem seems to be when the pushed object uses the platform plugin as well. Even after disabling it it still reacts in a weird way.

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