23.06.2017, 04:18
Quote:
@NaS
Isn't there any other solution like Detaching and re attaching the cam in a repeated timer? |

Quote:
This would be a spectator mode since the cameras will be monitored from the LSPD control center, how could it be done to always fix the camera in the direction the vehicle will go, with the player using the PlayerSpectateVehicle function?
|
No need for PlayerSpectateVehicle here (only TogglePlayerSpectating).
If you want to try the PlayerSpectateVehicle method, you only have to call PlayerSpectateVehicle with mode 3. But the camera position is different for many cars. It'll be smoother than the Camera Attaching method though.
You can also combine those two! First use PlayerSpectateVehicle, and then attach the Camera to an Object, which is attached to the Vehicle. This will prevent the Camera from being rotated while at the same time maintaining the direction the vehicle is looking (smoothly). Seems a bit buggy though. It sometimes warps the position and stops the cam from being attached.. So maybe you need to re-attach it regularly or so. Guess the attaching and the mode aren't working too well together.