Hi All,

I am getting myself all confused with the transformations i need to
apply for warping portals. I have two portals A and B, where A warps
to B and also B warps back to A so this it is kinda like a door but
player of the game actually places the two portals.

Say the Meshes for the portals (iMeshWrapper*) are in ma and mb and the
portal instances (iPortal*) in pa and pb and i will create two
transforms ab as the transform used in the warp from portal a to portal
b and ba for the other direction.

csReversibleTransform ab;
csReversibleTransform ba;

... calculate ab and ba from ma and mb->GetMovable()->GetTranform()

pa->SetWarp(ab);
pb->SetWarp(ba);

As i understand it i have transforms for T2O and O2T for two items A and
B using the GetMovable()->GetTransform(). What i need to find is a
transform that will translate from A to B. And set this as my portal
warp. Is this correct?

World space is common between these two, I just dont know how to find
the transform from A to B. I assume it is a "conglomeration" of the
transforms: A to World then World to B.

With the csMatrix3's i thought i just multiply A's T2O with B's O2T to
give me A2B's transformation matrix, and the vector translation is the
difference between the origins of A and B, but this did not seem to work.

Is someone more knowledgeable on this able to help me out? Or if it is
too much work to explain maybe fill in the code above and i'll try and
figure it out from that?

Thanks for any help in advance.
Brendon.



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to