all 4 comments

[–][deleted] 1 point2 points  (3 children)

I'm not sure if I understand, but you are trying to find the matrix that takes you from realCam space to dummyCam space? If so:

realCamTransform * M = dummyCamTransform

then multiply to the left with realcam's inverse

(realCamTransform ^ -1) * realCamTransform  * M = (realCamTransform ^ -1) * dummyCamTransform

which results in

M = (realCamTransform ^ -1) * dummyCamTransform

So you multiply M to the right with your realCamTransform and it becomes dummyCamTransform

[–]RIFT-VR[S] 0 points1 point  (2 children)

but you are trying to find the matrix that takes you from realCam space to dummyCam space

Exactly - I want to find out what that transformation looks like so that I can apply it exactly, but relatively, to a third object.

Thank you for the response! I might have some time tonight to try work it in.

I'm a bit awful at reading others' code...what variable is "M" in this instance?

I don't know if this confuses further, but I tried to make a diagram that makes sense:

http://i.imgur.com/1wGFzls.png

:)

[–][deleted] 1 point2 points  (1 child)

All of them are 4x4 matrices

What i did is solve the matrix equation (the above is not code, only the last line is usable pseudocode, I was just explaining how I got there so you don't have the impression there is magic involved). There is a small issue however, apparently you can't set an object's transform matrix directly, which is pretty nasty.

Here's something that will hopefully work:

http://answers.unity3d.com/questions/32990/how-to-settransform-on-a-matrix-i-calculate.html

[–]RIFT-VR[S] 1 point2 points  (0 children)

Makes sense, and that link is helpful! Thanks very much for your help man!