Jump to content

matrix rotation issue


Recommended Posts

Hi,

I am trying to give little banking in my flying object.......so i have created a 3 by 3 matrix,gave an angle and an axis in the direction of velocity....and then used it in  vex as a rotate matrix....

vector axis = normalize(@v);
vector matx = cross(axis, {0,-1,0});
vector maty = cross(axis, matx);


matrix3 m = set(normalize(matx),axis,normalize(maty));
 

float angle = fit(sin(@Time * 0.5 + fit(random(@ptnum),0,1,0,360)),-1,1,-45,45);
@angle = radians(@angle);

rotate (m, @angle, axis);

@orient = quaternion(m);

i want to know is there any way to print the value of rotate matrix?? i did the same thing in vop sop and its working but here i face some issue. what's wrong i didn't understand.

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...