Hello there,
I'm currenly porting one of my old games in 3D and I'm reaching a small problem with cameras and textures.
It's a 3rd person game so the camera follows the hero.
I put a simple mechanism using checkCollisionElipsoid with a rotation on X axis to look a bit up/down :
// perso.sprite.getMain() returns the head which is the parent object of the character
cam.setPositionToCenter(perso.sprite.getMain());
cam.align(perso.sprite.getMain());
cam.rotateX(totalRotationX);
world.checkCameraCollisionEllipsoid(Camera.CAMERA_MOVEOUT, ellipsoidCam, 10, 8);
world.checkCameraCollisionEllipsoid(Camera.CAMERA_MOVEUP, ellipsoidCam, 1, 5);
It's working fine for outdoor levels but while rendering an indoor level, I have a lot of time the camera going "out of the wall" and I can see behind the texture like in the second screenshot.
The first screen shot is when the camera is normal, the second is when the character is close to a wall and I rotate the camera to the right.
Is there a way to avoid that ?
Thanks in advance !