Platform behaviour - slipping off platform edges

0 favourites
  • 5 posts
From the Asset Store
Wanting to do a Shot n Run game easily? Here is your chance!
  • Hello.

    I'm using the platform behaviour with acceleration and deceleration set insanely high, 100000000000000, to simulate a kind of binary movement; either players move full speed or they don't move at all. No easing in or out. Works fine except if my characters land right at the edge of a platform they'll slip off it sometimes. That's not good. I need them to stay on the platform if they connect with it. None of this slippery slope business please. Has anyone else had this problem? Is there a way to fix it?

  • Why not just set the speed to 1000000000000 and back to 0 ?

    The sliding happens due to deceleration.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lennaert Thanks for the reply It's a good guess but it doesn't seem to be what causes the problem.

    If I set acceleration and deceleration to 0 when IsOnFloor is triggered then the object will slide along the platform until it either falls off the other side or hits a wall. That's to be expected obviously, but it'll *still* slide off the edge it lands near to in some cases. I'll post a couple of images to illustrate the problem better:

    Player jumps:

    And sometimes land just long enough to trigger IsOnFloor but *doesn't stay on the platform*:

    Acceleration/deceleration set to 0 on IsOnFloor:

  • I have not seen this before, perhaps your able to provide a sample capx ?

  • I think I figured it out. I had been resizing collision on the collision object to roughly fit with the sprite object animation so when the object landed the collision hull itself got resized. I removed that and it seems to work no problem now. Sometimes I wonder if my brain is too small for game development

    Thanks for helping out

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