Platformer and set to X, Self.X+/-speed*dt

0 favourites
  • 2 posts
From the Asset Store
A whole set you need to create a gorgeous winter 2d game
  • Problem Description

    here's the setup, we have the basic template of platforming of C2 modified to fulfill the needs of this bug report, J moves the sprite to the left while K moves it to the right, not with vector X actions though, but with set X to self.X + or - 300*dt, and we can see things if we smash into a wall, not the same if going left or right

    Attach a Capx

    https://1drv.ms/u/s!AjkoCSebIn9JizU1_14PLQcGmACF

    Description of Capx

    keep the J or K keys down to see the effects

    Steps to Reproduce Bug

    • start previewing
    • keep J pressed and see the sprite randomly jumps against the wall, by using the debugger, you can see it alters the Vector Y value
    • Let's try with K, it clips into the wall a little and also is slightly above the ground, press J again to see it does not fall back into the ground
    • press left or right to use the normal platforming movement, where this does not happen, and it'll fall back to the ground

    Observed Result

    jumps when hitting the wall on the left, clips and moes slightly upwards when going to the right in the wall

    Expected Result

    to stops right at the wall without jumping or elevating itself

    Affected Browsers

    • Opera: YES
    • FireFox: YES
    • Edge: YES

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID

    r239, unsure if this happens on previous versions

    live preview of the bug:

    http://c2-bug-platformer-set-x.bitballoon.com

    This bug was not actully discovered by me, but by someone else, I suggested to use the Vector X action instead, but I still think it should be reported.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Closing as won't fix. If you set the position directly instead of simulating controls, you effectively teleport the object to somewhere it isn't expecting to be, which breaks the platform behavior's stepping algorithms.

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