Skip to content

Commit 5d5c64d

Browse files
committed
Tilemap.createCollisionObjects will parse Tiled data for objectgroups and convert polyline instances into physics objects you can collide with in the world.
After defining tiles that collide on a Tilemap, you need to call Tilemap.generateCollisionData(layer) to populate the physics world with the data required. Debug.renderPhysicsBody updated to take camera location and body rotation into account. Body movement functions put back to velocity :) Updated to latest dev version of pixi and latest p2.js Updated docs
1 parent 375e9e3 commit 5d5c64d

201 files changed

Lines changed: 41910 additions & 47662 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = function (grunt) {
1111
compile_dir: 'dist',
1212
src: {
1313
phaser: [
14-
'build/p2.js',
14+
'build/p2.js',
1515
'src/Intro.js',
1616
'src/pixi/Pixi.js',
1717
'src/Phaser.js',

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ Significant API changes:
8888
* BitmapText has had a bit of an overhaul - the signature for adding a BitmapText has changed to: x, y, font, text, size. See the docs and examples for details.
8989
* World preUpdate, update and postUpdate have all been moved to Stage. So all children are updated regardless where on the display list they live.
9090
* Cache.getImageKeys and similar has been removed, please use Cache.getKeys(Phaser.Cache.IMAGE) instead, this now supports all 10 Cache data types.
91+
* After defining tiles that collide on a Tilemap, you need to call Tilemap.generateCollisionData(layer) to populate the physics world with the data required.
9192

9293

9394
New features:
@@ -117,6 +118,7 @@ New features:
117118
* Cache.addPhysicsData and Cache.getPhysicsData allow you to store parsed JSON physics data in the cache, for sharing between Bodies.
118119
* fixedToCamera now works across all display objects. When enabled it will fix at its current x/y coordinate, but can be changed via cameraOffset.
119120
* fixedToCamrea now works for Groups as well :) You can fix a Group to the camera and it will influence its children.
121+
* Tilemap.createCollisionObjects will parse Tiled data for objectgroups and convert polyline instances into physics objects you can collide with in the world.
120122

121123

122124
Updates:

0 commit comments

Comments
 (0)