Hi All,
I am using bones in my android project. My object is very near to the camera, as it is close to the camera, object is not fully seen. Camera radius is calculated based on the height of the object.
float[] bb = calcBoundingBox();
Log.d(TAG, "autoAdjustCamera: Bounding box="+bb.toString());
float groupHeight = bb[3] - bb[2];
Log.d(TAG, "autoAdjustCamera: groupHeight="+groupHeight);
cameraRadius = calcDistance(camera, frameBuffer,
frameBuffer.getHeight() / 1.5f , groupHeight);
minCameraRadius = groupHeight / 10f;
cameraTarget.y = (bb[3] + bb[2]) / 2;
I noticed the width and height obtained from skin.getMesh().getBoundingBox(); is very small values but the actual object is not a small object.
07-10 15:44:35.070: D/BlendShape(5727): height min-7.421923
07-10 15:44:35.070: D/BlendShape(5727): height max-0.5732739
07-10 15:44:35.070: D/BlendShape(5727): width min-1.96085
07-10 15:44:35.070: D/BlendShape(5727): width max1.96652
Please let me know if there is any issue in calculating the camera radius or there is any issue in my model.
Thanks and Regards,
Subha