Native referenceFiveM

ATTACH_CAM_TO_ENTITY

0xFEDB7D269E8C60E3 CAM
FUNCTION SIGNATURE
void ATTACH_CAM_TO_ENTITY(Cam cam, Entity entity, float xOffset, float yOffset, float zOffset, BOOL isRelative);
Property Value
Native Name ATTACH_CAM_TO_ENTITY
Hash 0xFEDB7D269E8C60E3
Return Type void
Parameters cam (Cam), entity (Entity), xOffset (float), yOffset (float), zOffset (float), isRelative (BOOL)

Description: ``` Last param determines if its relative to the Entity


### Parameters
- **`cam`** (`Cam`) — The camera handle.
- **`entity`** (`Entity`) — The entity handle.
- **`xOffset`** (`float`) — X-axis offset
- **`yOffset`** (`float`) — Y-axis offset
- **`zOffset`** (`float`) — Z-axis offset
- **`isRelative`** (`BOOL`) — 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)
Back to CAM