Heres a small picture of what I've done.
As you can see, That's not a true reflection. The size is also off. That's what my two questions are about.
Any help is greatly appreciated. Thanks in advance.
Code: Select all
matrix4 m = camera->getProjectionMatrix();
matrix4 trans;
trans(0,0)=1;
trans(1,0)=0;
trans(2,0)=0;
trans(3,0)=0;
trans(0,1)=0;
trans(1,1)=1;
trans(2,1)=0;
trans(3,1)=0;
trans(0,2)=0;
trans(1,2)=0;
trans(2,2)=-1;
trans(3,2)=0;
trans(0,3)=0;
trans(1,3)=0;
trans(2,3)=0;
trans(3,3)=1;
m*=trans;
vector3df vect = camera->getPosition();
m.transformVect(vect);
test2->setPosition(vect); //test2 shows me where the second camera is
camera2->setPosition(vect);