Yip, you are absoultely right. When it comes to calculating the scaling - I think that it could be something with the distance between the observer and the sphere. I believe that there's an equation that would help us solve it, but I'm not good at maths. :?Originally Posted by User137
But there's a ray of hope. This function taken from GLScene looks interesting and could help us getting the scaling work properly:
[pascal]
procedure TGLCamera.AdjustDistanceToTarget(distanceRatio : Single);
var
vect : TVector;
begin
if Assigned(FTargetObject) then begin
// calculate vector from target to camera in absolute coordinates
vect:=VectorSubtract(AbsolutePosition, TargetObject.AbsolutePosition);
// ratio -> translation vector
ScaleVector(vect, -(1-distanceRatio));
AddVector(vect, AbsolutePosition);
if Assigned(Parent) then
vect:=Parent.AbsoluteToLocal(vect);
Position.AsVector:=vect;
end;
end;
[/pascal]
Anyway, I'm waiting for your opinions.
Bookmarks