Hey I have created my body using following code: (please read full description)
Body polyBody; final BodyDef mBodyDef = new BodyDef(); mBodyDef.type = BodyDef.BodyType.DynamicBody; mBodyDef.position.x = 20; mBodyDef.position.y = 5; polyBody= mPhysicsWorld.createBody(mBodyDef); final PolygonShape mPoly = new PolygonShape(); mPoly.set(vertices); objectFixtureDef.shape = mPoly; polyBody.createFixture(objectFixtureDef); mPoly.dispose();
Now it's time for connecting my polygon with body using
and when I do
mPhysicsWorld.registerPhysicsConnector(new PhysicsConnector(mPoly, polyBody, true, true)); it doesn't accept mPoly as I expect an IAreaShape instead.
Is there any way that i can parse my it to IAreaShape? or can anyone suggest how can I create a body without using sprite. Its strictly prohibited that I can't use sprite as I need to cut/slice my body further.