How to do coords to heading, or like coords to camera angle/coords

I’m trying to make the camera look at the coordinate so it can follow a player for my script.
The problem is i have no idea on how to do the calcultaions

I believe the following native will do it for you:

Usage is most likely in a while-loop:

local ped = [Ped you want your cam to follow]
while [camera should follow ped] do
  Wait(0) -- executes the while-loop every frame, it's necessary here
  SetGameplayCamFollowPedThisUpdate(ped)
end
1 Like

Thank you