Tweening engine?

On Wed, Jul 7, 2010 at 1:03 AM, inchworm <[email protected]> wrote:

> 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
>



-- 
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|
www.neurotechresearch.com
http://blog.alladvanced.net
http://www.meetup.com/GO3D-Games-Opensource-3D/
Tel:054-4962254
[email protected]
[email protected]

Reply via email to