Skip to content

Commit

Permalink
Tilemap.createCollisionObjects will parse Tiled data for objectgroups…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
photonstorm committed Feb 18, 2014
1 parent 375e9e3 commit 5d5c64d
Show file tree
Hide file tree
Showing 201 changed files with 41,910 additions and 47,662 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = function (grunt) {
compile_dir: 'dist',
src: {
phaser: [
'build/p2.js',
'build/p2.js',
'src/Intro.js',
'src/pixi/Pixi.js',
'src/Phaser.js',
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Significant API changes:
* 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.
* World preUpdate, update and postUpdate have all been moved to Stage. So all children are updated regardless where on the display list they live.
* Cache.getImageKeys and similar has been removed, please use Cache.getKeys(Phaser.Cache.IMAGE) instead, this now supports all 10 Cache data types.
* After defining tiles that collide on a Tilemap, you need to call Tilemap.generateCollisionData(layer) to populate the physics world with the data required.


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


Updates:
Expand Down
Loading

0 comments on commit 5d5c64d

Please sign in to comment.