schiho Posted January 16, 2020 Share Posted January 16, 2020 (edited) I'm trying to replicate the 'align' node with VEX. What I'm looking for is simple matrix transform extraction with few reference point positions. The goal is to calculate a rotation/translation matrix from between the actual geo and rest. Thanks in advance. Edited January 16, 2020 by schiho Quote Link to comment Share on other sites More sharing options...
ftaswin Posted January 21, 2020 Share Posted January 21, 2020 vector p = point(0,"P",0); // pivot position vector u = set(0,1,0); vector n = normalize(v@v); vector o = cross(u,n); matrix3 m3 = set(o.x, o.y, o.z, u.x, u.y, u.z, n.x, n.y, n.z); //3D Rotation Matrix matrix m4 = set(o.x, o.y, o.z, 0, u.x, u.y, u.z, 0, n.x, n.y, n.z, 0, p.x, p.y, p.z, 1); //3D Transformation matrix If you dont have any vectors then you can build it using 3 points reference. Let me know if you need help for this too Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.