Problem with falling platforms

0 favourites
  • 9 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • I made a very simple falling platform.

    it's a block with physics and solid behavior. when the player (a sprite with platform behavior) collides with the block, it waits 1 sec, then becomes non-solid and starts falling by becoming movable (physics).

    The problem is that, sometimes, the player ignores the platform behavior's gravity, and starts to fall with the physics behavior's gravity speed, even not having the physics behavior!

    And it also it ignores colisions with jump-thru objects...

    here, i made a simple capx in case you wanna take a look...

    I'm using google chrome (but it happens on firefox too), win7 home basic, and my graphics are updated

  • Hi Lobo,

    nice Example:

    Here is a little Solution for you...

    Solution

    Hope it helps..

    You should add the "Jumpt.." Behavior instead of the "solid" Behavior to

    the Falling Plattforms...

    KMag

  • hm, thanks for the effort, but the problem is still here...

    i've been trying different behavior combinations, jump-thru, solid, even using a custom movement vertical speed instead of physics to drop the platform, but it seems like it's about the way platform behavior works, being "attached" to the floor <img src="smileys/smiley5.gif" border="0" align="middle" />

    Somehow, the player keeps attached even when i deactivate the solid/jump-thru behavior

    EDIT: actually, i've found a solution...

    after the 1 second, when platform becomes not solid, check if player is colliding at an offset with it. if true, add some negative vectorY to te player. this way it "detaches" from the platform when it falls, but still, would be awesome if it happened automaticaly <img src="smileys/smiley17.gif" border="0" align="middle" />

  • ah - okay..you can post your updated capx when you wan't...

    KMag

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OH TRUE! <img src="smileys/smiley36.gif" border="0" align="middle">

    forgot aout the capx, my bad...

    here >>> \o/

    its not perfect yet, 'cause the player falls faster than the platform, but at least its not attached to it <img src="smileys/smiley17.gif" border="0" align="middle">

  • If you read the manual section for Physics, you'll see that physics objects only truly interact with other physics objects, and using solid is totally redundant.

    It also mentions in the Physics Basics link that although you can add the Platform behavior and physics, they don't really interact correctly, and all interactions should be performed using the physics attributes.

    This could be why you are getting inconsistent results.

  • nu nu zeno, it's not about the physics <img src="smileys/smiley17.gif" border="0" align="middle" />

    I added physics to make the platform fall, but the bug happens even if i use a custom movement

    the problem is: when player is on a solid object and the object becomes non solid, the player keeps "glued" to it

  • The falling platform counts as a moving platform so the platform engine will probably try to keep the player sitting on it. You should use your workaround (adjusting the velocity) if you want to avoid this.

  • Yep, i noticed falling and moving platforms changes de velocity of the "player", so he doesnt get glitchy while standing on it ,and it's a good thing... the solution wasnt thaaat hard to figure out

    ty anyways, ashley   <img src="smileys/smiley9.gif" border="0" align="middle" />

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