ZIndex issue for PhysicsObjectBehavior

May 20, 2011 at 5:54 PM

Are active physics bodies ignoring Z-Order and promoting themselves to the top?  I have a shape with a PhysicsObjectBehavior attached, and a path acting as a bucket to hold the shape.  The path is covered by an image, yet when the ball drops from gravity, it goes in front of the image.  I have the ball set to the proper location to be covered by the graphic, yet the physics engine is bumping that for some reason.

Any ideas?

My next idea is to gut the physics helper and just use straight Farseer code, but that would defeat the purpose of PhysicsHelper...

 

Coordinator
May 20, 2011 at 11:05 PM

When the physics controller initializes, all of the sprites are removed from their container Canvas and placed into your Game Canvas (the one with the PhysicsController), so some re-shuffling can occur.

But if you explicity set the Z-Index, it should carry over OK --- have you tried that?

May 21, 2011 at 3:33 AM

That worked like a champ.  Thanks!