GetAiNavigationBlockerData

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 13:52, 4 September 2026 by QCherry (talk | contribs) (Document G1R:MP 0.1.2 navigation collision API)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getAiNavigationBlockerData

AVAILABLE FROM UPDATE 0.1.2
This function is available in G1R:MP 0.1.2 and later. The contract below includes the compatibility guarantees introduced in that update.

Returns the canonical geometry and state of one blocker owned by the calling resource.

Syntax

table|false getAiNavigationBlockerData(string blockerId)

Parameters

Name Type Required Description
blockerId string yes The opaque decimal identifier returned by createAiNavigationBlocker. Keep it as a string.

Returns

Returns id, ownerResource, enabled, shape="polygon", points, minZ, and maxZ, or false for an unknown, invalid or foreign ID.

Examples

Inspect a blocker's canonical footprint:

local data = getAiNavigationBlockerData(blockerId)
if data then
    outputDebugString("vertices=" .. tostring(#data.points))
end

Notes

  • Available only in server-side resource scripts.
  • Box and cylinder inputs are returned as their conservative canonical convex polygon, so the returned shape is always "polygon".
  • Coordinates are converted back to metres. A resource cannot inspect another resource's blockers through this function.