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.
Option shape
EveryAdd* 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.
