Hi ,
actually i am rendering the PhysicsTest sample on QCAR(Vuforia) . all most my work is complete . its rendering fine on QCAR GL. but i am working half an hour to set the scaling of serialized object. as u told i check the full code . the scaling is not set after this.
private Object3D sBox;
sBox = Loader.loadSerializedObject(res.openRawResource(R.raw.boxmodel));
sBox.build();
public void addBox(int x, int y, int z) {
BoxShape shape = new BoxShape(new Vector3f(2, 2, 2));
float mass = 500;
Vector3f localInertia = new Vector3f(0, 0, 0);
shape.calculateLocalInertia(mass, localInertia);
Object3D boxgfx = new Object3D(sBox);
boxgfx.translate(x, y, z);
boxgfx.setScale(3f); .............................................................here...............!!
boxgfx.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
boxgfx.setCollisionOptimization(Object3D.COLLISION_DETECTION_OPTIMIZED);
boxgfx.build();
world.addObject(boxgfx);
JPCTBulletMotionState ms = new JPCTBulletMotionState(boxgfx);
RigidBodyConstructionInfo rbInfo = new RigidBodyConstructionInfo(mass, ms, shape, localInertia);
RigidBody body = new RigidBody(rbInfo);
body.setRestitution(0.1f);
body.setFriction(0.5f);
body.setDamping(0, 0);
body.setUserPointer(boxgfx);
boxgfx.setUserObject(body);
bodyList.add(body);
dynamicWorld.addRigidBody(body);
}
for integrating the QCAR i am doing set he modelView matrix on JPCT camera.