make to object look at each other

   5087   10   2
User Avatar
Member
623 posts
Joined: 8月 2008
Offline
i have to nulls and i want to aim each one looking at the other one, so when i move any of them, they will bouth looking at each other.
using the look at parameter houdini give me a recursive error :cry:

any work around, or maybe i missing a step?

Attachments:
look_at.hip (89.0 KB)

User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
Infinite recursion. All objects have transforms baked in. One can't orient to another and then back again. Just the way it is.

One way to get the proper transform is to take your two nulls, parent either another null, bone or any other object to each of the two nulls and then make the child object look at the other child's parent null and visa versa.

Now you can hang other nodes off of the objects with look-ats.
There's at least one school like the old school!
User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
Infinite recursion. All objects have transforms baked in. One can't orient to another and then back again. Just the way it is.

One way to get the proper transform is to take your two nulls, parent either another null, bone or any other object to each of the two nulls and then make the child object look at the other child's parent null and visa versa.

Now you can hang other nodes off of the objects with look-ats.
There's at least one school like the old school!
User Avatar
Member
623 posts
Joined: 8月 2008
Offline
Ah… gotcha…

Attachments:
look_at.hip (103.0 KB)

User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
Seems I got some recursion in my post…
There's at least one school like the old school!
User Avatar
Member
663 posts
Joined: 11月 2013
Offline
Another method , you can make A look at B, B lookat Null, and copy A's position to Null as reference.

I think it is houdini's limit. Look At is only consider the Position of each other. it should not take all transform matrix.
User Avatar
Member
50 posts
Joined: 7月 2013
Offline
Speaking about the Look At channel… what is the best way to do an aim constraint with excluding an axis (so it is two dimensional rotation, instead). I've tried with expressions and VOPSOP setups based on arcos cosine, and it works… except when one of the objects goes from Positive into Negative world spac. I would call it “cartesian jump”, because in VOPSOP the acos function expects an angle only between 0 and 90 (actually every positive angle should work despite limitations, but there is huge difference between 0 and 180 and -90 to +90). (I managed to reduce the jumps from 4 to 1 with some if expressions, but it is still very clumsy approach and it even doesnt support a full rotation, as the intention was…) :?
User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
You can use the up vector parameter to constrain the look at to do what you want.
There's at least one school like the old school!
User Avatar
Member
50 posts
Joined: 7月 2013
Offline
Stupid question: do you mean the “orient up vector” on the OBJECT level? I tried to play with different values, but it doesnt constraint anything, only causes an one-time rotation around Z (when I use Y for aim and want to lock X-rotation for example). :?

Attachments:
lookAtTest.hipnc (1.0 MB)

User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
Is this what you wanted?

Attachments:
lookattest_289_jw.hipnc (1.3 MB)

There's at least one school like the old school!
User Avatar
Member
50 posts
Joined: 7月 2013
Offline
Yes, exactly, this! Thanks Jeff, you are gold!
  • Quick Links