Quotei guess i need a plane which always remains vertical and faces camera by only rotating about y axis. is there an easy way of this?
Here's a little trick I discovered that avoids a lot of geometric thinking.
Code Select
//make a temporary camera
Camera backupCam=world.getCamera();
world.newCamera();
Camera newCam=world.getCamera();
//put the temporary camera at the plane's level and facing the plane
newCam.setPosition(backupCam.getPosition().x,yourPlane.getTransformedCenter().y,backupCam.getPosition().z);
newCam.lookAt(yourPlane.getTransmormedCenter());
yourPlane.align(newCam); //the plane will face the temporary camera
//restore the original camera
world.setCameraTo(backupCam);
I had something like this working a few days ago, but I erased the code. I'm not sure if the above is exactly what I did, but I think it is. It should work. Hope it helps