Mod:Creation Kit/GetSafePosition - ObjectReference

Member of: Mod:Creation Kit/ObjectReference Script

Get the nearest navmesh 'safe' position of radius aSafeRadius within aSearchRadius.

Syntax
float[] Function GetSafePosition(float aSearchRadius=-1, float aSafeRadius=-1) native

Parameters

 * aSearchRadius: If specified, a floating point value that determines the spherical area in which to search for a safe location.
 * Default: -1 ( any value 0 or below will be replaced with FLT_MAX)


 * aSafeRadius: If specified, a floating point value that determines the minimum clear spherical area on the navmesh to consider 'safe'.
 * Default: -1 (any value 0 or below will be replaced with the defaults for a landing space)

Return Value
An array of floats containing the x,y,z coordinates of the safe position, if it exists. An empty array otherwise.

Examples
float[] safeLocationArray = MySignalGrenade.GetSafeLocation(1024.0,300.0)
 * Find a safe landing location for the vertibird.