CrowBot Posted August 1, 2014 Share Posted August 1, 2014 JSON: { "height":33, "name":"Collision", "objects":[ { "height":0, "name":"", "polyline":[ { "x":0, "y":0 }, { "x":0, "y":24 }, { "x":24, "y":24 }, { "x":24, "y":48 }, { "x":48, "y":48 }, { "x":48, "y":72 }, { "x":72, "y":72 }, { "x":96, "y":96 }, { "x":96, "y":144 }, { "x":72, "y":168 }, { "x":72, "y":216 }, { "x":96, "y":216 }, { "x":144, "y":264 }, { "x":144, "y":288 }, { "x":96, "y":336 }, { "x":96, "y":360 }, { "x":72, "y":384 }, { "x":72, "y":432 }, { "x":96, "y":432 }, { "x":96, "y":456 }, { "x":120, "y":456 }, { "x":120, "y":504 }, { "x":144, "y":504 }, { "x":144, "y":552 }, { "x":192, "y":552 }, { "x":192, "y":624 }, { "x":240, "y":624 }, { "x":288, "y":672 }, { "x":288, "y":720 }, { "x":336, "y":720 }, { "x":336, "y":744 }, { "x":384, "y":744 }, { "x":408, "y":768 }, { "x":408, "y":792 }, { "x":-24, "y":792 }, { "x":-24, "y":0 }, { "x":0, "y":0 }], "properties": { }, "type":"", "visible":true, "width":0, "x":24, "y":0 }, { "height":0, "name":"", "polyline":[ { "x":0, "y":0 }, { "x":0, "y":48 }, { "x":-24, "y":48 }, { "x":-48, "y":72 }, { "x":-48, "y":96 }, { "x":24, "y":96 }, { "x":24, "y":120 }, { "x":96, "y":120 }, { "x":96, "y":168 }, { "x":144, "y":168 }, { "x":144, "y":216 }, { "x":96, "y":216 }, { "x":72, "y":240 }, { "x":24, "y":288 }, { "x":24, "y":360 }, { "x":48, "y":384 }, { "x":72, "y":384 }, { "x":72, "y":432 }, { "x":96, "y":432 }, { "x":96, "y":480 }, { "x":120, "y":480 }, { "x":120, "y":504 }, { "x":144, "y":504 }, { "x":144, "y":528 }, { "x":168, "y":528 }, { "x":168, "y":576 }, { "x":144, "y":600 }, { "x":120, "y":624 }, { "x":120, "y":720 }, { "x":96, "y":720 }, { "x":48, "y":768 }, { "x":48, "y":792 }, { "x":192, "y":792 }, { "x":192, "y":0 }, { "x":0, "y":0 }], "properties": { }, "type":"", "visible":true, "width":0, "x":576, "y":0 }], "opacity":1, "type":"objectgroup", "visible":true, "width":32, "x":0, "y":0 }, var walls = game.physics.p2.convertCollisionObjects(map, "Collision", true); Point.area = function(a,b,c){ return (((b[0] - a[0])*(c[1] - a[1]))-((c[0] - a[0])*(b[1] - a[1])));}; Uncaught TypeError: Cannot read property '0' of undefined Not sure what's going on with this... no idea whats causing the error. Any help? Link to comment Share on other sites More sharing options...
steve228uk Posted August 16, 2014 Share Posted August 16, 2014 Looks like this was an error in 2.0.7, if you get the latest version from the GitHub master branch (2.10) that'll fix it. Link to comment Share on other sites More sharing options...
valueerror Posted August 17, 2014 Share Posted August 17, 2014 http://www.html5gamedevs.com/topic/8223-what-changed-in-convertcollisionobjects-in-207-its-producing-error-a-is-undefined-now/#entry49647here is my thread to this topic including a compiled version of 2.1 dev that solves it Link to comment Share on other sites More sharing options...
Recommended Posts