Solid with Movements behaviour not fixed

0 favourites
  • 4 posts
  • Problem Description

    Make a plain Sprite with Solid, size it tall vertically.

    Then make a second plain sprite (any size) with just CustomMov/Platform/8Direction behaviour.

    Finally, move the first sprite with any method/way towards the 2nd sprite either left/right. (You can even get the solid sprite with any movement behaviour). Colliding it would push the second sprite with it, BUT notice it is not pushed in the same direction but rather upwards or downwards. Pushing it left would caused the pushed sprite to be going downwards and vise versa.

    *If you want to reproduce this with platform behaviour, have the gravity = 0.

    This bug was discovered when I was having my player jumping up with platform.vector y on a moving solid wall to the right will cause it to jump up super high and I wondered why it doesn't do that on the other direction to the left?

    Attach a Capx


    Description of Capx

    A Capx with just 2 object sprites with behaviors as stated above.

    Steps to Reproduce Bug

    • Move the green tall sprite with arrow keys LEFT and RIGHT.
    • This will push the yellow sprite and reproduce the bug.

    Observed Result

    Pushed sprite doesn't get pushed in the same direction, but rather weird anti-clockwise results.

    Expected Result

    It should be pushed in the same direction! if it was pushed from the left, it goes left. And if it was pushed from the right, it goes right with it.

    Affected Browsers

    • NW.js: YES
    • FireFox: YES

    Operating System and Service Pack

    Windows 10 Home Single Language

    Construct 2 Version ID


  • Closing as won't fix. The solid behavior is not meant to be used with movements. When you move a solid like that, you're effectively teleporting a solid in to another movement, which is set to not overlap solids. When the behavior finds itself wedged inside a solid it's not supposed to be in, it resorts to a sort of emergency "get me out of here" avoidance which looks for a nearby space and positions the object there instead. That doesn't always move in a predictable direction, hence the inconsistent direction. So this is actually working correctly, given the design of the engine.

  • Ashley

    What about moving walls and moving platforms or move them on an axis every tick also counts as movements, which aren't meant to be used too? This might be a little too much to ask but my platformer works with climbing big moving wall-like platforms and seeing my player jumps higher on one side of it and shorter the other was really out of my expectation. I never made my player a solid behaviour either. Having my game as low resolution just augments this inconsistent effect even further.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The original bug report used 8 direction right? The platform behavior does make special provision for moving platforms, and has a clearer main axis of left & right with jumping. In that case moving solids may work better. For example if a wall is moving right, the push-out-of-solid algorithms should know to push you right, rather than 8 direction which can choose any direction. Really it depends on the particular behavior and circumstances.

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