I forgot to mention, my usual 'fix' for relative objects is to copy the positional and rotational data from the primary to the secondary object and then issue relative movement and rotation commands to create an offset location.
For example, let's say I wanted a camera to be behind and above and object no matter how it is rotated...
` get object 1's location and orientation
x = object position x(o1)
y = object position y(o1)
z = object position z(o1)
xa = object rotation x(o1)
ya = object rotation y(o1)
za = object rotation z(o1)
` sync the object 2 (which is hidden) to object 1
position object o2, x,y,z
rotate object o2, xa,ya,za
` rotate and project object 2 backwards
turn left o2, 180.0
pitch object up o2, 10.0
move object o2, 100.0
` set camera position and point at object 1
x2 = object position x(o2)
y2 = object position y(o2)
z2 = object position z(o2)
position camera 0, x2,y2,z2
point camera 0, x,y,z
` Because the camera location is projected from the object
` it can be combine with object collision systems to make
` a camera that will not penetrate walls or other objects,
` if desired.
This is off the top of my head, please forgive any typos.
--
TAZ