How do I fix an issue with a physics based object not sliding down sloped parts of the tilemap?

0 favourites
  • 1 posts
From the Asset Store
112 High-Quality destruction sounds for videogames
  • Hi,

    In the game i'm working on, I have a player object with the physics behavior. The object is moved by clicking and pulling back on it with the mouse, angry birds style. It has a density of 0, and prevent rotation is checked. The friction coefficient is 0.5, and elasticity is set to 0. I'm using a tilemap for the platforms in the game. Some of the tiles are angled so that if the player jumps onto them, they slide down. This works fine if the player falls onto the angled tile from high enough up, but if the player jumps onto the tile from a short way up, he gets stuck and wont slide down the tile. I tried creating a sprite that to cover the angled tiles that would set the friction of the player and the tilemap to 0 when it is overlapped with the player, but it didn't fix the problem. I have tried several variations of telling the player object to move down the slope when overlapping the cover sprite, using move to, apply force, apply impulse, set world gravity, set velocity, but none of these fixed the problem the way I implemented them. I also played around with different levels of density, friction and elasticity on both objects.

    Thanks everyone, let me know if I can provide more info.

    Here is the Capx for the project. I covered up my tilemp with blue so it looks a little janky, but the collsion polygons should be correct.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)