Hello! when i wanna set object like parametr collision get error
Uncaught TypeError: Cannot set property ‘gameObject’ of undefined
My example code look like this:
this.load.json(‘shapes’, ‘assets/shapes.json’); // initialize fun
this.load.atlas(‘sheet’, ‘assets/atlas.png’, ‘assets/atlas.json’);
var shapes = this.cache.json.get(‘shapes’); // create fun
var ground = this.matter.add.sprite(0, 0, ‘sheet’, ‘background’, {shape: shapes.background});
Object is created via editor, here is my code of json object { "generator_info": "Shape definitions generated with PhysicsEditor. Visit htt - Pastebin.com
Where is problem?