Jump to content

Search the Community

Showing results for tags 'load.physics'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. This is what I'm trying to do: // preloaderload.image('car', 'images/raceCar.png', 28, 50);load.physics('carPhysics', 'images/raceCarPhysics.json');load.image('level', 'images/maps/level.png', 1664, 2048);load.physics('physicsData', 'maps/levelPhysics.json');// createmap = game.add.sprite(1664*0.5, 1024, 'level');game.physics.p2.enableBody(map, true);map.body.kinematic = true;map.body.clearShapes();map.body.loadPolygon('physicsData', 'level');app.player = player = game.add.sprite(150, 320, 'car');player.anchor.setTo(0.5, 0.5);player.collideWorldBounds = true;game.physics.p2.enableBody(player, true);player.body.clearShapes();player.body.loadPolygon('carPhysics', 'car'); // failsBut I'm getting this error: Phaser.Cache.getPhysicsData: Invalid key/object: "carPhysics / car" libs.js:13Uncaught TypeError: Cannot read property 'length' of null libs.js:21Uncaught TypeError: Cannot read property 'left' of null If I load physicsData only, it works. But if I load the car physics I keep getting this error. I've quadruple checked spelling/case/file locations - it's all correct. Is there something simple I'm missing with trying to load multiple physics files?
×
×
  • Create New...