CameraTarget
What camera.attach has a player’s camera follow: a player, a vehicle or ped by its
network ID, or one of your objects.
Definition
Section titled “Definition”type CameraTarget = | { kind: "player"; player: PlayerTarget } | { kind: "vehicle" | "ped"; networkId: number } | { kind: "scriptObject"; objectId: number };Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
kind |
"player" | "vehicle" | "ped" | "scriptObject" |
What kind of target it is. |
player |
PlayerTarget |
With "player": the player. A player who has left is their ID. |
networkId |
number |
With "vehicle" or "ped": its network ID, a vehicle’s id. Renamed in 0.28 from netId. |
objectId |
number |
With "scriptObject": the object’s ID from objects.create. |