Set3DTextDrawDistance

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 20:32, 13 August 2026 by QCherry (talk | contribs) (Synchronize Lua API documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

set3DTextDrawDistance

Changes the maximum distance at which a replicated world-space text label is rendered.

Syntax

bool set3DTextDrawDistance(string textId, number drawDistance)

Parameters

Name Type Required Description
textId string yes The opaque identifier returned by create3DText.
drawDistance number yes Maximum render distance in metres, from 1 to 1000.

Returns

Returns true when the label is owned by the current resource and the update is accepted; otherwise returns false.

Examples

Make an interaction label visible only at close range:

set3DTextDrawDistance(interactionLabel, 8.0)

Notes

  • Available only in server-side resource scripts.
  • The client performs distance culling using this server-authoritative value.