Jump to content

[1.1.3] .setCircle(); problem


ZRT
 Share

Recommended Posts

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

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

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...