I am writing a game where my characters can sometimes go through all the other objects (and each other) and sometimes they can't. I am using JBox2D which is still based on the previous version of Box2D, but I don't see where this would have changed except I'm dealing with Shape instead of Fixture. There is no method to set the isSensor value on an existing Shape so I'm setting the m_isSensor field true and false as needed. It works except that it doesn't work right away. It seems that anything my character is already in contact with doesn't see the change unless they are moved away from each other first. I suppose I could keep destroying and recreating my characters each time they switch modes, but that seems pretty cumbersome. Is there a better way to do this? Thanks.
And yes, I realize that touching a m_ variable isn't good practice. I'm just trying to make my game work.
And yes, I realize that touching a m_ variable isn't good practice. I'm just trying to make my game work.