| Property | Value |
|---|---|
| Native Name | POINT_CAM_AT_ENTITY |
| Hash | 0x5640BFF86B16E8DC |
| Return Type | void |
| Parameters | cam (Cam), entity (Entity), offsetX (float), offsetY (float), offsetZ (float), p5 (BOOL) |
Description: Points the camera at the specified entity.
Offset works like GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS.
Parameters
cam(Cam) — Cam (Return value of CREATE_CAM or CREATE_CAM_WITH_PARAMS).entity(Entity) — Entity for the camera to point at.offsetX(float) — X offset for the camera (left/right).offsetY(float) — Y offset for the camera (forward/backward).offsetZ(float) — Z offset for the camera (up/down).p5(BOOL) — Always seems to be 1 (true).
Examples
local cam = CreateCameraWithParams("DEFAULT_SCRIPTED_CAMERA", GetEntityCoords(PlayerPedId()), 0.0, 0.0, 0.0, 90.0, true, 2)
PointCamAtEntity(cam, PlayerPedId(), 0.0, 0.0, 0.0, true)
RenderScriptCams(true, false, 0, true, true)