GetSafePosition - ObjectReference
Jump to navigation
Jump to search
Member of: ObjectReference Script
Get the nearest navmesh 'safe' position of radius aSafeRadius within aSearchRadius.
Syntax[edit | edit source]
float[] Function GetSafePosition(float aSearchRadius=-1, float aSafeRadius=-1) native
Parameters[edit | edit source]
- 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[edit | edit source]
An array of floats containing the x,y,z coordinates of the safe position, if it exists. An empty array otherwise.
Examples[edit | edit source]
; Find a safe landing location for the vertibird.
float[] safeLocationArray = MySignalGrenade.GetSafeLocation(1024.0,300.0)