ZRT Posted February 16, 2014 Share Posted February 16, 2014 Hi guys, I'm following this example to make a collision between a circle sprite and a rectangular sprite. But I'm getting this: Uncaught TypeError: Object #<Object> has no method 'setCircle' I know it should be pretty simple, but for some reason it won't work. Here's the small piece of code: this.player = game.add.sprite(70, 100, 'player'); this.player.body.setCircle(25);Thanks. Link to comment Share on other sites More sharing options...
Zaidar Posted February 16, 2014 Share Posted February 16, 2014 Basically your error comes from your title : I think this feature come with Phaser 1.1.5. I've searched setCircle in 1.1.3, but didn't find any match compared to 1.1.5. I remember these new collision (circles and polygon) arrived not so long time ago with 1.1.4, fastly replaced by 1.1.5. I advise you to update your phaser source code, if you can. Link to comment Share on other sites More sharing options...
ZRT Posted February 16, 2014 Author Share Posted February 16, 2014 Yep, you're right. I just updated to 1.1.5 but another problem occurred with the gravity. Will look that up now, thanks. Zaidar 1 Link to comment Share on other sites More sharing options...
Heppell08 Posted February 16, 2014 Share Posted February 16, 2014 Yeah I had gravity issues too when I switched. Mainly because in 1.1.3 the gravity was a mistake set up. It was supposed to be 500 or 900 etc but setting it to just 9 was the same as 900. That has since changed and the gravity is now set to stuff like 900 instead of 9. So if your game had gravity of 9.4 just change that to 940 and it should act the same way. Link to comment Share on other sites More sharing options...
Recommended Posts