tyFlow Forum
tyFlow Script Matrix3 data - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: tyFlow Script Matrix3 data (/thread-3713.html)



tyFlow Script Matrix3 data - rjanders0003 - 06-09-2023

G'Day

Is it possible in tyFlow Script to modify matrix3 data directly - say eg: I wanted to add an offset to position Z but leave rest of matrix3 data in tact.

Rob

EDIT:
I think I figured it out myself - took a bit - lol

Code:
// RJA - get the Matrix Data for particle 0 in the current flow
Matrix3 mtRJA = tf.GetTM(0);
// RJA - For Debug purpose Print to Lisetner the row4 data (translation)
Print(mtRJA.row4);
// RJA - Adjust the Matrix3 Data by adding a position offset
mtRJA.row4.z = mtRJA.row4.z + 1;
// RJA - Update the Matrix3 Data with new adjusted Z translation Data
tf.SetTM(0, mtRJA);



RE: tyFlow Script Matrix3 data - tyFlow - 06-12-2023

Yes, your edit is the correct method: row4 is the position portion of a Matrix3 transform.