How do I prevent the player from moving w/ sine platforms?

0 favourites
  • 2 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I'm designing a level that is made of narrow platforms. Each platform has square sine behavior, and every 3 seconds shifts to the right, then back 3 seconds later. The problem is that if the player is standing on a platform when it changes positions, he will move along with it! I want the player to stay in place so that if he doesn't jump before the platforms move, he will fall. It seems that the player's position is linked to the position of the platform he's standing on.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Assuming, you are using the Platform behavior for the Player and the Solid behavior for the platform(s), you can use the Solid action Solid: Set enabled to disable the collision between the Player and the platform.

    As a side effect, this will cause the player to fall through the platform.

    Since I'm not completely sure whether your intention is to completely eliminate the collision or to just make the player not move along with the platform, you can use this workaround to make the player not stick to the platform, but also not fall through it:

    When you disable the platform's solid state, also set the Player's Platformer gravity and speed to 0.

    This will make him keep his position.

    Remember to switch the gravity and solid state back on when needed.

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