Jump to content

Vectorial platformer with P2 physics and slope detection?


Ciro
 Share

Recommended Posts

I want to make a game where the player go around polygons (not tiles) that are platforms. I would like to add features like detection of the angle of the slope, where the player speed might change depending on the slope or even slide on it.

 

How I do something like that?

Link to comment
Share on other sites

use tiled as map editor.. paint your tiles/slopes on a normal layerthat will have no collision activated later in the game and acts more like a background and use an objects layer to paint polylines on it that fit to the slopes/tiles.. you can than convert those polyline objects into polygon physics bodies..

i dontknow about the detection of the angle but the player will slide down anyways with a velocity depending on the angle of the polygon and the gravity setting and of course depending on the applied material.. if you give thematerial of the polygonno friction it will slide on it very fast..

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...