Search the Community

Showing results for tags 'polyline'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 3 results

  1. Hello everyone, this is my first time posting on this forum, which means I'm pretty desperate at this point haha! I'm trying to make a simple game where a character is sliding down a hill, this is what I got so far: I want to make the hill as slippery as ice, just like some ice parts in this game: I learned a lot from this game btw. I tried to copy how the user made his ice material, but it doesn't seem to work in my game! // Create ramp and player from tiles sharp =,"points"); player =,10, 'player'); // Define materials groundMaterial =; playerMaterial ='player'); // Give the ramp material for (i=0; i<sharp.length; i++){ sharp[i].setMaterial(groundMaterial); } // define what happens when one material contacts the other, groundMaterial, { friction: 0 , restitution: 0 }); What am I doing wrong? Please help me
  2. Hello, I'm trying to set collision with Tiled using the "Tile Collision Editor" on Tiled but I can't make it work on game. Basically I want to create a Polyline for each different Tiles so I don't have to copy/paste the polyline objects in the object layer. For the moment I use one big Polyline object on a object layer that follow my map but it's not viable beause I have to draw all my tiles manually. Here is the part of the code I use to incorporate the object layer (I'm using ES6). It's working but it's not what I want : this._map = new Map(this._game, mapName);// ...this._map.addTilesetImage(tilesName, tilesName);this._blocksLayer = this._map.createLayer('collision');this._blocksLayer.resizeWorld(); this._game.physics.p2.convertTilemap(this._map, this._blocksLayer); this._game.physics.p2.convertCollisionObjects(this._map, 'test'); // where 'test' is the name of my layerThanks in advance for the help !
  3. this is how the array that contains all the physicsbodies is created polyline_bodies = game.physics.p2.convertCollisionObjects(supermap,"polygons");i can then cycle over all bodies and flawlessly set collisiongroups, materials and so on.. but if i want to cycle through this array and kill the physics bodies in it for (i=0; i<polyline_bodies.length; i++){ polyline_bodies[i].destroy()}i get the following weird error: Uncaught TypeError: Cannot set property 'body' of nullc.Physics.P2.Body.destroy @ phaser.min.js:23level0.update @ game.js:616how can i destroy the bodies in there.. thank you !