Jump to content
Sign in to follow this  
breadbox

Rotate Vector

Recommended Posts

I'm not sure how to put together a matrix to rotate a normal.  I would like to do 2 different types of rotation operations.  I would like to do these in VOP SOPs or wrangles so they can be easily and quickly used in copy sops to drive clones.

 

The first would be spin along the normal.  so if you can imagine a football thrown through the air.. the trajectory is pointing towards the goal, but it needs to spin around.(z spin)

 

The second rotate operation would be the cross product of this, so now the football will be thrown badly and it will spin perpendicular to the direction of travel (x spin).

 

my attempt is attached.  I tried to calculate the normal in a attribute and then use that as the axis parameter in a rotate vop. It looks like its "almost" working.  at certain rotation angles there is a pretty severe skew that happens to the copied object.  as well the rotation is not smooth, its kind of choppy, not right.

 

 

Its also significant that the vector I want to rotate around will be different "for each" point.  using an up vector it seems to work, but not a custom vector angle per point.

rotate_vector_ODFORCE_V1.hipnc

Edited by breadbox

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×