Jump to content
SteveNi

Object facing vector

Recommended Posts

Hi

So basically I have a vector and an obj, how can I make the obj face the vector by specifiyng the front axis of the obj? (front, side, up)

Is there a traditional way to do this? Because Im trying to do this myself through Vex and some transforming operations..

Example:

Example.jpg

Share this post


Link to post
Share on other sites

it depends on many factors. what is the source of the vector (another object's transform, another object's attribute, current object's attribute)? on what level you want to make the transform (you want to transform the object itself or it's contents)? do you want to transform one object or many objects? do you have one input vector or many of them? the solution may vary greatly.

Share this post


Link to post
Share on other sites
On 6/10/2016 at 8:25 AM, dchow1992 said:

hope this helps

 

matrix_ops.hip

Yes exactly!

I knew that you had to use matrices and vector math like the dot product you used, to rotate the obecjt,but Im not yet pratical of this side of houdini, thank you so much.

I'll credit you whenever I'll use this file you made in a project/video:)

 

Thanks again :)

Share this post


Link to post
Share on other sites

Actually I encountered a problem...

As you can see in image 1 the coordinate system is ok, but as the object wich the system is generated by, moves in the "lower part" of the circle, it flips to the other side...how can I fix this?

Screenshot_1.jpg

Screenshot_2.jpg

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

×