Hello,

I'm working on a scene in which the camera is completely surrounded by
objects in space. When you click on one of those objects the camera
should turn to face it and then move to within 500px of it. Prior to
clicking on an object the user is able to move the camera around. So
on enter frame i'm currently using:

_camera.x += ((_view.mouseX*20) - _camera.x) * 0.005;
_camera.y += ((_view.mouseY*20) - _camera.y) * 0.005;

My problem is that I can't quite determine how to smoothly make the
camera turn to look at its new target when a user clicks one of the
objects. If I assign the camera a new target it'll just snap to a new
position. The same if i tell the camera to lookAt something.

So is there a good way to make the camera turn to face an object and
then to approach it..?

- rob

Reply via email to