Posts: 723
Threads: 366
Joined: Jun 2016
Hi,
How to change camera angle? i set InterpolateCameraLookAt coordinates same as InterpolateCameraPos, but camera view is not in that side what to do?
Posts: 723
Threads: 366
Joined: Jun 2016
But that coordinates is using getplayerpos and getxyinfrontofplayer ..
Posts: 4,759
Threads: 33
Joined: Dec 2013
Reputation:
0
No, it doesn't use those functions. It uses the interpolate functions. Projects go into scriptfiles.
Posts: 723
Threads: 366
Joined: Jun 2016
I mean that i'am in server getting player pos calculating xyinfront and setcamerapos using that, too i need calculate lookat to look straight player facing angle.
Posts: 1,208
Threads: 36
Joined: Apr 2015
PHP код:
GetPointInFrontOfCamera3D(playerid,&Float:tx,&Float:ty,&Float:tz,Float:radius,&Float:rx=0.0,&Float:rz=0.0);
3DTryg:
https://sampforum.blast.hk/showthread.php?tid=591010
Example:
PHP код:
new Float:tx,Float:ty,Float:tz;
GetPointInFrontOfCamera3D(playerid,tx,ty,tz, 5.0); //5 meters
SetPlayerCameraLookAt(playerid,tx,ty,tz,CAMERA_CUT);
Posts: 4,759
Threads: 33
Joined: Dec 2013
Reputation:
0
Interpolate functions are to move the camera to one point to another.
Posts: 723
Threads: 366
Joined: Jun 2016
Posts: 3,085
Threads: 37
Joined: Nov 2012
Reputation:
0
Are your InterpolateCameraPos and InterpolateCameraLookAt final coordinates the same? Because your LookAt function should be the coordinates of where you 'want' the camera to be looking when it finishes moving. You've probably set the coordinates wrong for the LookAt function. Try moving the LookAt coordinates 100 units further ahead.