Orient Point Towards Another

Recommended Posts

Hello! I'm copying a bunch of flat pentagon shapes to points. All of the copies are facing the correct direction except one:

I first set a perpendicular N direction on the points to copy to, which helps the pentagons get copied almost in the right direction.
Do I first need to aim the orient direction of the points toward a specific direction?

I have included a hip file with something I think might work, but I'm just not sure how to turn two vectors into an orient.

Any help is greatly appreciated!

orient_toward_specific_point.hiplc

Share on other sites

You can use maketransform in either VEX or VOP to generate a transform matrix from 2 vectors and then convert that matrix to a quaternion.

I had to reverse your v@v vector as well. It was pointing the wrong way.

orient_toward_specific_point.hiplc

Share on other sites

Thank you so much @madebygeoff! This function is going to come in very handy for me. Taking notes now!

The world of quaternions is slowly becoming easier to understand.

Share on other sites

I basically think of them as rotation around a vector direction. You define a vector in space and you define the amount you rotate around it. That's it. Pretty simple.

All the complicated stuff happens under the hood. But if you want to dive into what is actually going on with all the complex numbers and four-dimentional space and everything, this is a really good explanation:

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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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

×
×