Hi there. I've a rotation question for which I've not been able to find a good answer on the Wiki or searching on the forum I hope somebody could enlighten me.
I have two prims; let's call the first one "object" and the second one "point". The second one is a small sphere placed exctly on the surface of the first one (that's the reason of the names).
Now I want to rotate the point and have the object rotating accordingly around that point so that the position on the surface will not change.
I figured out that due to the rotation the object will be moved as follow:
newpos = pointpos + (objpos - pointpos) * rot
which correspond to translate in the origin the vector from the center of the point to the center of the object, rotate that vector around the origin and translate the rotated vector back to the point.
The problem is: how should I calculate the rotation of the object itself?
I also had the opposite problem: rotate the object and having the point rotating so that it will continue staying on the object surface but I managed to handle this case.
Any suggestion on how to do it?
Thanks.
. note that blues position is defined as a local offset to red. if you're looking at it from blue's side then the relative positions are r@llGetPos+<-1,0,0> and b
llGetPos