Skip to main content
Bridge.Target is a normalized targeting API. You register interactions on entities, models, or world zones with a single option shape, and the bridge dispatches to whatever targeting resource is running — ox_target, qb-target, or, with neither installed, its own Interact prompts. Your call site stays the same across all three.

Availability

Client only.

Provider selection

Target reads its own convar — atlas:target, not atlas:ui:target.
The bridge’s own target maps each zone/entity to a single Interact prompt, so it uses only the first option you pass, and AddModel is a no-op (native Interact cannot target by model). For multi-option targets or model targeting, run ox_target or qb-target.

Option shape

Every Add* call takes a list of options with this normalized shape:
string
required
The interaction label shown on the eye/prompt.
string
An icon for the option.
number
default:"2.0"
Max interaction distance.
function
fun(entity): boolean — return false to hide the option dynamically.
function
required
fun(entity) — called when the option is chosen. Receives the targeted entity (for AddEntity / AddModel).

Methods

AddBoxZone

vector3
required
Center of the box.
vector3
default:"vec3(2,2,2)"
Box dimensions.
number
default:"0.0"
Box rotation (honored by ox_target / qb-target).
table[]
required
The interaction options.

AddSphereZone

vector3
required
Center of the sphere.
number
default:"2.0"
Sphere radius.
table[]
required
The interaction options.

AddEntity / AddModel

number
For AddEntity — the entity handle to attach options to.
string | string[]
For AddModel — one or more model names (ox_target / qb-target only).
table[]
required
The interaction options.

Remove

Bridge.Target.Remove(id) — removes a zone/entity registration by the id returned from any Add* call.

Examples

When it falls back to the bridge’s own Interact, the prompt tints to the player’s theme accent like every other component. Install ox_target for the richest experience (multi-option, model targeting, box rotation).