Forum: Poser Python Scripting


Subject: Setting an object's face to 'point towards' another object.

timarender opened this issue on Jul 06, 2013 · 7 posts


timarender posted Sat, 06 July 2013 at 3:47 AM

Consider an object (e.g. a box) where one side faces a camera. I want one side of the box to continue to face the camera when the camera moves.

Posers 'Point At' would probably be sufficient; except that I cannot control which Face points towards the camera.

I now have a mass of code (which does not work!) where I attempted (unsuccessfully) to link up sins/cos/tan asin/acos/atan values with the X Y and Z Rotations of the Object.

Can anyone point me towards an example of suitable code?

In effect, if the Object's coords are (x1,y1,z1); and the Camera's coords are (x2,y2,z2); then what rotX, rotY and rotZ should I give the Object so it points towads the camera?