Align to Camera Script
22-Aug-95 10:15:50
Sb: #185444-Align to Camera Script
Fm: Neil McEvoy 72274,3032
To: Jonas Ruikis [ADESK] 73172,1351
Jonas –
Thanks for the reply about object alignment – and pleased to meet you! I have
the book and CD, and I've already learned a lot from your implementation in
CAMTRACK.
My problem was actually an extension of your program: in addition to rotating
the objects, I wanted to move them to a particular plane parallel to the camera
plane, so I had to calulate some displacements as well. And that's where it
all came off the tracks, so to speak. The displacements seemed to occur in
directions that I didn't expect.
I had trouble getting the new "move" function to work for me. I was able to
use your approach to rotate the object to face the camera. I then tried to
calculate the displacement needed to move the object in the direction of the
vector normal to its front face. With this new vector, and the present
location of the object, I tried to use the "move" function in the PXP Script
Extension. I verified my trigonometry by hand, but somehow, the script didn't
give me the expected results, and I wondered if I was missing some subtlety in
the "move" function.
Any thoughts?
Neil McEvoy
Eolas Inc.
Kingston, Canada..