Orbit or Hover View

TWaver 3D For Flex(English)

If you want to navigate all sides of a 3D scene by using mouse, apply hover camera on the Network3D is an ideal choice.

With hover camera, users can pan, lift and move the camera around the 3D scene by dragging the mouse on the Network3D object. The distance between the camera and the center of the 3D scene determines the FOV.

Apply hover camera:

network.applyHoverCamera(panAngle,tiltAngle,zoom,distance);

panAngle: Stands for the pan angle of the hover camera, and the default value is -180 degree.

tiltAngle: Stands for the tilt angle of the hover camera, and the default value is 10 degree.

zoom: Stands for the zoom of the camera applied on the Network3D object, and the default value is 5.

distance: Stands for the distance between the hover camera and the center of the 3D scene, and the default value is the bounds of the whole 3D scene's initialization size.

Incrementing or decrementing the tiltAngle value causes the camera to increase or decrease it's elevation angle, as represented in the right image. The distance property defines the radius on which both these rotations are performed. Two angles and a radius used to define a position in space in this manner are sometimes referred to as polar coordinates.

Note: In this schematic view of a simple scene using the hover camera, the left figure shows the scene displayed from above, with α denoting the panAngle property. The right figure shows the scene displayed from the side, with β denoting the camera tiltAngle property. And the d denotes the distance property in both cases.

By default, the hover's tilt angle is constraint in the 10 degree. The elevated view of the scene is locked. If you want to change the default settings and elevate the view as you want, you can reset the relative properties of the Network3D object.

network.tiltAngleUpLimit = 60;
network.tiltAngleLowLimit = -60;

With above segment, developers can unlock the elevated view of the 3D scene.

Users will be able to tilt the camera between -60 degrees and 60 degrees.

After applying the hover camera on the Network3D component, users can orbit around the 3D scene by dragging the mouse or zoom in/out the scene with the mouse wheel.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.