Move Player Cammera

Hey,
Im trying to let the Player Cammera folow an Entity.

So I want to make an ingame Creation tool for an Script of mine and Im struggeling to focus the cammera on an Entity.

The Entity needs to get placed to a whole other location than the player is so I would be very practical if the game Cammera follows certain coordinates.

I have looked up the Natives but cant find what I need.

Hi, with

AttachCamToEntity(cam, entity, xOffset, yOffset, zOffset, isRelative)

you can attach a camera to an entity. It should also follow the entity if it moves. The last param “isRelative”, determines if its relative to the Entity.

PointCamAtEntity(cam, entity, xOffset, yOffset, zOffset, p5)

This Native points the cam at an entity. The param p5 seems to always be 1, according to the FiveM Native Reference.

Hope it works / helps.

1 Like

Thanks it works!