Jump to content

[1.1.3] .setCircle(); problem


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);


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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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