How do I smooth moving up stairs for my 3d platformer physics?

0 favourites
  • 4 posts
From the Asset Store
10 Retro songs ideal for platformers or farming games
  • This is more of a Math question but since it uses construct features I figured I would ask it here instead of Stack Overflow...

    I've built a variation on the 3d platformer example project.

    It uses a similar dz adjustment system for the player's z-height, allowing them to jump/fall.

    From line 38 onwards in the Player event sheet, I set a maximum height for steps, and then, when a player collides with a step, they move up onto it. The problem is, the movement is very rigid and sudden, and not natural at all. For other reasons I cannot interpolate the Z-axis as it is used for bobbing/etc.

    How can I modify the player's DZ on line 44, to counter-act gravity and move up exactly four pixels before beginning to fall again?

    + Player: On collision with Platforms + Player: DZ = 0 + System: Platforms.ZElevation + Platforms.ZHeight ≤ Player.ZElevation + StepHeight + System: Platforms.ZElevation + Platforms.ZHeight > Player.ZElevation -> System: Set PlayerOldZ to Player.ZElevation -> Player: Set Z elevation to Platforms.ZElevation + Platforms.ZHeight -> Player: Set OnGround to True

    Thanks!

    Full capx: https://drive.google.com/file/d/1ri4KdhNpJotnZ0uNoLAzYYXpD0r10mJt/view?usp=sharing

  • This is too advanced for me LOL. But why don't you use Platform Behaviour instead?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 3D physics are custom. Constructs platform behavior does not support 3D. :)

  • Nice, but I think you game is good when I try, and I don't think it is necessary to make it more smoother. You should continue the gameplay without having to think about too much detail

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