Jump to content

Center Arcade circle body on sprite (and possible bugs)


Arcanorum
 Share

Recommended Posts

I have a sprite with an anchor of 0.5, 0.5, so the middle of the sprite. How would I add a circle body to the sprite with the center of the circle on the anchor of the sprite, so that if I scaled the sprite, the circle would scale from the middle of the sprite and not from the top left? Seems simple but setCircle (and setSize) seems to be messed up as I've been trying to get them to work all day...

- Circle body size doesn't seem to respect the scale of the parent sprite or its anchor.

Link to comment
Share on other sites

Hi Arcanorum, I haven't used circular bodies but, AFAIK

  • The body is always centered on the sprite, regardless of the sprite's anchor, unless you change the body offset
  • Always resize a circular body w/ setCircle, never setSize (which removes the circle)
  • The body offset refers to the sprite texture, so it's also scaled when the texture (sprite) is scaled
Edited by samme
wrong
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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