Hi, i am using 3.6.0
i'am trying to make a camera thats pans and tilt with a rotating
button for pan, and a slider for the tilt.
i want to control the camera with these button and slider.
my rotating button sends values from 0 to 180, and -1 to -180, and the
tilt slider send values from 1, to 89.
when applying the values the camera start to pan and tilt fast as it
add the value each frame, instead of assign the value.
i define the camera like this:
miCamera = new Camera3D();
miCamera.zoom = 1;
miCamera.focus = 300;
miCamera.x=0;
miCamera.y=1000;
miCamera.z=2000;
miCamera.pan(0);
miCamera.tilt(1);
_view.camera = miCamera;
and the function to assign the values are:
function newTilt(val:Number){
//trace("tilt: "+val);
miCamera.tilt(val);
}
function newPan(val:Number){
//trace("pan: "+val);
miCamera.pan(val);
}
i don¡t understand why it adds the value and not assigning the value.
thanks.