thank you Li, I have tried to work with you code snippet. It is almost working for me but I am need a bit more help. I have uploaded a diagram at: http://qutaibah.com/media/diagram.jpg
can you explain how to use the "Spherical to Cartesian" snippet to get the same effect. lets talk about positioning "ball 1", and "ball 2". I can probably figure the rest out. I have figured that: _lookAtTarget is the large sphere its self (or the scene origin) _distanceToCenter is the radius of the large sphere _elevation = 0; _azimuth = varies depending on sphere location. thank you for you help Qutaibah On Nov 17, 2009, at 8:07 PM, Li wrote: > Maybe this snippet will help: > > Spherical to Cartesian: > var X:Number = _lookAtTarget.x + > _distanceToCenter*Math.sin(_azimuth)*Math.sin(_elevation); > var Y:Number = _lookAtTarget.y + > _distanceToCenter*Math.cos(_elevation); > var Z:Number = _lookAtTarget.z + > _distanceToCenter*Math.cos(_azimuth)*Math.sin(_elevation); > > Cartesian to Spherical: > _distanceToCenter = _cameraDummy.distanceTo(_lookAtTarget); > _azimuth = Math.atan2(_cameraDummy.x - _lookAtTarget.x, > _cameraDummy.z - _lookAtTarget.z) - Math.PI; > _elevation = -Math.acos((_cameraDummy.y - > _lookAtTarget.y)/_distanceToCenter);
