Hi there,
I’ve got a question regarding the camera control on away4.x.
When clicking on an specific object (whiwhs stands for a button), I would like the camera to smoothly hover to a defined panAngle and tiltAngle.
I combined the camera with a hovercontroller, I thought that setting the panAngle and tiltAngle to specific values would do the trick but nothing is happening. What I am doing wrong or is there something I do not understand right ?
Here is an extract of my code :
// Setup Camera
camera3D = new Camera3D(new PerspectiveLens(25));
camera3D.lens.far = _CAMERA_VIEW_DISTANCE;
cameraController = new HoverController(camera3D,null,185,7,1000,0,90,0,360,8,2,true);
private function onMeshMouseDown(event:MouseEvent3D):void
{
cameraController.tiltAngle);
if (event.object.name == 'MyObject'){
this.cameraController.panAngle = 180;
this.cameraController.tiltAngle = 0;
// Nothing moves.....
}
}