SGPosition Methods

The methods of the SGPosition class are listed here. For a complete list of SGPosition class members, see SGPosition class.

Name

Description

move Method

Moves the coordinate a specific distance.

moveToward Method

Moves a coordinate the given distance toward another coordinate.

lerp Method

Moves a coordinate a given percentage toward another coordinate.

distanceTo Method

Measures the distance between two coordinates.

anglesTo Method

Measures the angles (yaw and pitch) between two coordinates.

aimTo Method

Returns an SGPosition object that represents the same position as the caller’s coordinates and the angles that are directed toward the given coordinates.

toAbsolute Method

Returns an SGPosition object that is converted to absolute height.

toRelative Method

Returns an SGPosition object that is converted to height relative to terrain.

changeHeightType Method

Converts the height of the caller to a new height type based on the caller’s x and y.

isEqual Method

Compare the properties values of this SGPosition object to another SGPosition object.