Orientation problem / lookat

hi folks,

even though this sounds like a simple problem i can’t figure out how to do this. imagine following scenario:

i’ve got several quads moving around in 3d-space and a camera also doing so. now, wherever the camera is in this scene right now, the quads should always face directly towards the camera.

using the LookAt node appeared promising at first but i did not figure out how to achieve what i wanted. in general, the LookAt node did not (intuitively) do what i wanted it to do (but i admit that i could not figure out what the UpVectors are for).

can anybody lend a hand?

As far as I know, LookAt node is for camera use.
You can get your desired result with the transform invers node, in a clever combination somehow. Check its help file for description.

Here is a small patch.
UpVectors are XYZ and set for the Axis showing up. And one is set only. So, this is for Camera to have right orientation - besides where (position) and sight (lookat) you need to know if your head and body is at axis left/right, down/up or forward/backward (XYZ).

invers.v4p (6.7 kB)

hello frank,

thanks for your quick and helpful answer. actually i tried the invers node before using lookat but did not succeed (yeah, the transform order does matter :)

i achieved now what i wanted to do - if anybody is interested, here is the patch.

facing_quads.v4p (9.5 kB)

i’m not aware if tonfilm’s selfalign.fx is part of the beta20 or the addonpack.
but i’m pretty sure that it exactly does what you want.

and i heard rumors that the primitives will have some new “space” modes with the upcoming beta21…

yes SelfAlign.fx is included in the vvvv release since beta19…

that’s interesting stuff - thanks for the hint!

kalle is right!

in the next version you would grab a billboard node and put it into the transform branch of the quad.

Nice one Gregsn, that’ll be very handy indeed!