Jump to content
adizepl

Creating a vector between two points to attach (parent) and orient new object.

Recommended Posts

Hi there. 

I am struggling with setting up the following:

I have 2 points and I need to create a position/rotation vector from them to attach a new geometry onto the vector.

I have got to the point where I have the new object aligned with the vector and I get a correct position and rotation, however I also get a random rotation along the object's own axis. (in an attached file it's the tube which is randomly rotating around it's own X axis.

Any help would be appreciated, see the attached set up in the file.

Many thanks! 

Adrianna
 

vector_01.hipnc

Share this post


Link to post
Share on other sites

Not sure I completely understand, but take a look.

 

 

ezgif-2-361ad294a6f4.gif

 

 

May I add if you want just the tube, a simple polywire sop after you have your line will have the same effect

vector_orient_odf.hipnc

Edited by vtrvtr

Share this post


Link to post
Share on other sites

the thing is that you only got one vector, from point 1 to point 2. You need atleast two vectors to get rid of the random flipping of your object. You can create a static vector like up to fix this, but it will flip when it crosses this static vector.

Heres some solutions

vector_fix.hipnc

 

Red is dihedral, Green is with up, and blue is with solver without up

vector_fix.gif

Edited by ThomasPara
added gif

Share this post


Link to post
Share on other sites

Great, thank you both for you help and some really useful tips!

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

×