Jump to content

Physics bodies don't move when sprite.visible === false


Recommended Posts

I'm making sprites that smell bad -- they spew particles of smell wherever they go. I use overlap so the other sprites can smell them. So I need physics bodies. The problem is that when I set .visible = false, the physics bodies stop moving entirely. They just sit there while my smell particles fly around. I discovered this by turning on debug.body and debug.spriteBounds. I found an old issue where someone had found the opposite problem: they wanted the bodies to be turned off when the sprite is invisible. Looks like an option was added to allow for that, but maybe that broke the case I need? Or maybe I'm just doing something wrong in my setup? For now, I'm working around the problem by setting alpha to zero. And I think that will work for me -- I probably never need to set alpha to anything else for particles of smell. But I'm interested whether this is a bug, or just something I'm doing wrong.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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