Jump to content

@orient attribute to @N an @up?


ron2812

Recommended Posts

Hi everyone!

Is there a way to calculate @N and @up from the @orient attribute?
Basically the same as the orient to curve SOP does - it only outputs N and up, but i got all the Pitch/Yaw/Roll bells and whistles. 

I have everything layed out on my curve the way i want, but Unreal Engine doesn't seem to read the orient attribute. 

Thanks in advance!

 

Link to comment
Share on other sites

Hi Ronald, here is the extraction of axes from quaternion in vex:

matrix3 m = qconvert(p@orient);

v@xaxis = set(m.xx, m.xy, m.xz);    
v@yaxis = set(m.yx, m.yy, m.yz);
v@zaxis = set(m.zx, m.zy, m.zz);

 

The default orientation of v@N is zaxis, and @up is yaxis. So this is probably what you need:

matrix3 m = qconvert(p@orient);

v@up = set(m.yx, m.yy, m.yz);
v@N  = set(m.zx, m.zy, m.zz);

 

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...