Skip to content

Commit

Permalink
Update AttachCamToEntity.md
Browse files Browse the repository at this point in the history
  • Loading branch information
matehun00 authored Jul 21, 2023
1 parent 83395c9 commit 2287576
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions CAM/AttachCamToEntity.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,20 @@ Last param determines if its relative to the Entity
```
## Parameters
* **cam**:
* **entity**:
* **xOffset**:
* **yOffset**:
* **zOffset**:
* **isRelative**:
* **cam**: The camera handle.
* **entity**: The entity handle.
* **xOffset**: X-axis offset
* **yOffset**: Y-axis offset
* **zOffset**: Z-axis offset
* **isRelative**: Whether or not the camera will be relative to the entity
## Examples
```lua
local entity = PlayerPedId()
local cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true)
AttachCamToEntity(cam,entity, 0.0, 0.0, 0.0, true) --attach camera to the center of the entity
SetCamActive(cam, true)
RenderScriptCams(true, false, 0, true, true)
```

0 comments on commit 2287576

Please sign in to comment.