#Align to Camera Script
16-Aug-95 13:36:37
Sb: #185436-#Align to Camera Script
Fm: Jonas Ruikis [ADESK] 73172,1351
To: Neil McEvoy 72274,3032
Hi Neil,
<< The basic approach has been to align a dummy object within the 3DS scene,
and then query the position and rotation of this object within the script. >>
You'll find my version of this puzzle on the "Inside 3ds4" CD-Rom.
'———————————————————–
' CAMTRACK.K3D
' Keeping Objects Perpendicular to a Camera's Position
' An "Inside 3D Studio" utility
' By: Jonas Ruikis
'
' CAMTRACK rotates a selection of objects about their pivot point (of course)
' so their first face is prependicular to a selected Camera's position.
' Axes may be locked for the objects.
' Either the camera and/or the objects may be in motion.
' Respects the current Time Segment
'
' ================================================================
Track this script down and enjoy it..
A few tips.. I had to compute the dot product and the cross product in order to
find the axis and rotation. Also, don't try to create a rotation key on frame
0.
jonas[adesk]