mlookat
eharetea

Helps return values needed for transformations to occur.

Computes a 3x3 matrix .

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Wednesday July 30th, 2008 03:37 PM

since mlookat computes a 3X3 matrix, you need to use the explodematrix() expression:
explodematrix(

 mlookat(



   vector3(

   point("../box1",0,P,0), point("../box1",0,P,1), point("../box1",0,P,2) 

          ),



   vector(

   "[0,1,0]"

         )



       ),

"RST, "XYZ", "RZ")


this translates to:
if you transform vector 1 using the order Rotate, Scale, then Translate, using the order x,y then z, to where vector 2's values are, echo what the rotate z value would be for the transformation to occur.


explodematrix(

 mlookat(



  vtorigin("","/obj/model"),



  vector("[0,1,0]")



       ),

"SRT", "XYZ", "RX")