GetSafePosition - ObjectReference

Member of: ObjectReference Script

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

SyntaxEdit

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

ParametersEdit

  • 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 ValueEdit

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

ExamplesEdit

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

See AlsoEdit