---
title: "SetPlayerCameraLookAt | open.mp"
description: "Set the direction a player's camera looks at."
canonical: https://omp.itsneufox.com/th/docs/scripting/functions/SetPlayerCameraLookAt
language: th
---

# SetPlayerCameraLookAt

## คำอธิบาย

Set the direction a player's camera looks at. Generally meant to be used in combination with SetPlayerCameraPos.

| Name | Description |
| --- | --- |
| playerid | The ID of the player whose camera to set. |
| Float:x | The X coordinate for the player's camera to look at. |
| Float:y | The Y coordinate for the player's camera to look at. |
| Float:z | The Z coordinate for the player's camera to look at. |
| cut | The [style](https://omp.itsneufox.com/th/docs/scripting/resources/cameracutstyles) of the change. Can be used to interpolate (change slowly) from old pos to new pos using CAMERA\_MOVE. |

## ส่งคืน

1: The function was executed successfully.

0: The function failed to execute. The player specified does not exist.

## ตัวอย่าง

```c
SetPlayerCameraPos(playerid, 320.0, 50.0, 170.0);
SetPlayerCameraLookAt(playerid, 324.34, 54.122, 173.35);
```

## บันทึก

warning

Using the camera functions directly after enabling spectator mode doesn't work.

## ฟังก์ชั่นที่เกี่ยวข้องกัน

-   SetPlayerCameraPos: Set a player's camera position.
-   SetCameraBehindPlayer: Set a player's camera behind them.
-   GetPlayerCameraPos: Find out where the player's camera is.
-   GetPlayerCameraFrontVector: Get the player's camera front vector
