I have a wall of Planes at different angles and positions. I'd like to get the camera to rotate and look straight at the focused plane. I have created a dummy Plane (lookAtMe) that tweens to the Plane I click on as follows:
private function planeClicked(e:InteractiveScene3DEvent):void
{
lookAtTarget.copyTransform(this);
var time:Number = 1;
var tweenObject:Object = {};
tweenObject.x = lookAtTarget.x;
tweenObject.y = lookAtTarget.y;
tweenObject.z = lookAtTarget.z;
tweenObject.rotationX = lookAtTarget.rotationX;
tweenObject.rotationY = lookAtTarget.rotationY;
tweenObject.rotationZ = lookAtTarget.rotationZ;
tweenObject.onUpdate = onSeatTween;
tweenObject.ease = Cubic.easeInOut;
TweenMax.to(lookAtMe, time, tweenObject);
}
private function onSeatTween():void
{
camera.lookAt(lookAtMe);
}
The camera centers on the looAtMe Plane but doesn't rotate so that the selected Plane is straight on.
Please help! Thanks.