jasper1990 Posted April 10, 2018 Share Posted April 10, 2018 I keep getting the error : 'add' of undefined for this.physics.add.sprite(100, 450, 'dude'); but this.add.sprite works but then I cant use setVelocityY either. my configure is this var config = { type: Phaser.AUTO, width: 800, height: 600, backgroundColor:'#00cd00', physics: { default:'impact', impact: { x: 0, y: 0, width: 800, height: 1200, thickness: 32 } }, scene: { preload: preload, create: create, update: update } }; Link to comment Share on other sites More sharing options...
PixelPicoSean Posted April 11, 2018 Share Posted April 11, 2018 Since you are using impact physics engine, you'd use `this.impact.add.sprite(...)` instead. Link to comment Share on other sites More sharing options...
Recommended Posts