So. As the mirrors seem to be moving further and further on the roadmap I decided to take shot at creating mirrors by using the render texture tutorial as a base.
The problem for my crap mathematics comes when I try to calculate the camera matrix for the mirror camera.
I tried looking about how to calculate this but I just couldn't quite figure out how to do it correctly in Esenthel.
Reference
So what I have is
Camera camera[0]; //Main camera
Camera camera[1]; //Camera used for rendering mirrors
in the RenderToTexture() function I setup the Mirror camera as the rendering camera and now im actually able to render the mirror camera to a texture and set it up as a texture for a mesh.
Now here comes the tricky part.
On every mirror object I should try to get the matrix for the mirror camera.
I tried several times to achive this mirrored matrix by using the functions in matrix.h (like inverse and mirror)
Some how It did not give the effect I was looking for.
PHP Code:
Matrix mirrorMatrix;
mirrorMatrix = camera[0].matrix;
mirrorMatrix.mirror(mirrorPlane);
camera[1].matrix = mirrorMatrix;
If anyone has any experience or any advice how to do this It would be very appriaciated.