GlennimusPrime Posted July 17, 2022 Share Posted July 17, 2022 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 Quote Link to comment Share on other sites More sharing options...
madebygeoff Posted July 17, 2022 Share Posted July 17, 2022 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 1 Quote Link to comment Share on other sites More sharing options...
GlennimusPrime Posted July 17, 2022 Author Share Posted July 17, 2022 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. Quote Link to comment Share on other sites More sharing options...
madebygeoff Posted July 18, 2022 Share Posted July 18, 2022 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: https://eater.net/quaternions Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.