SGFlyThrogh Class

This class represents an advanced ‘fly through’ object. A fly through object is used when the camera flies between several points. When using this object you can control some of the fly through parameters. You can either create such object set its paramaters abd call it ‘start’ method or you can simply call SGWorld.navigate.flyThrough().

Constructor

Name

Description

Constructor

Initializes a new instance of the SGFlyThrough class.

Properties

Name

Description

waitOnPoint

Time the camera would wait when it arrives to a new waypoint before continuing to the next waypoint.

viewingDistance

Determine the distance from which the camera will view the waypoint.

viewingDirection

Determine the direction from which the camera will view the waypoint.

onFlyTo

Pointer to a function to be notified when the fly through has arrived to a new waypoint. See SGFlyThrough Events.

onFinish

Pointer to a function to be notified when the fly through has finished flying through all of the waypoints. See SGFlyThrough Events.

Methods

Name

Description

start Method

Start the fly through process. Alternatively, you can call SGWorld.navigate.flyThrough() method passing it the SGFlyThrough object.

finish Method

When called, terminate the fly through.

Events

Name

Description

onFlyTo

Fires when the fly through has arrived to a new waypoint.

onFinish

Fires when the fly through has finished flying through all of the waypoints.