Problem with InterpolateCameraPos & InterpolateCameraLookAt
#1

Hello guys. I have the next 3 commands:

PHP код:
// On Top
new Float:coord[2][3];
// OnPlayerCommandText
if(!strcmp(cmdtext"/startcamera"true))
{
        
SetCameraBehindPlayer(playerid);
        
InterpolateCameraLookAt(playeridcoord[1][0], coord[1][1], coord[1][2], coord[1][0], coord[1][1], coord[1][2], 1000CAMERA_MOVE);
        
InterpolateCameraPos(playeridcoord[0][0], coord[0][1], coord[0][2], coord[0][0], coord[0][1], coord[0][2], 1000CAMERA_MOVE);
        
        
SendClientMessage(playerid0xBBDDCCEE"This should work now!");
        return 
1;
    }
    if(!
strcmp(cmdtext"/camerapos"true))
    {
        new 
Float:xFloat:yFloat:z;
        
GetPlayerPos(playeridxyz);
        
coord[0][0] = x;
        
coord[0][1] = y;
        
coord[0][2] = z;
        
SendClientMessage(playerid0xAABBCCDD"Interpolate Camera Position has been set!");
        return 
1;
    }
    if(!
strcmp(cmdtext"/cameralook"true))
    {
        new 
Float:xFloat:yFloat:z;
        
GetPlayerPos(playeridxyz);
        
coord[1][0] = x;
        
coord[1][1] = y;
        
coord[1][2] = z;
        
SendClientMessage(playerid0xAABBCCDD"Interpolate Camera Look  has been set!");
        return 
1;
    } 
And I type: /camerapos, then /cameralook. But when I type /startcamera, the InterpolateCameraPos is set corect, but the camera look at isn't set corect. I mean, when I type /startcamera, my camera position look is set by my facing angle and it is not set by InterpolateCameraLookAt.

And if I change the order in /startcamera command between InterpolateCameraPos and InterpolateCameraLookAt and I type /startcamera, my camera is freeze ; I can't move it with my mouse anymore...



Example:
Here I type /camerapos ( to set the InterpolateCameraPos )
http://imageshack.us/a/img96/3391/samp006rln.png

Here I type /cameralook ( to set the InterpolateCameraLookAt )
http://imageshack.us/a/img5/2646/samp007eo.png

This is my angle:
http://imageshack.us/a/img521/3015/samp008ni.png

Here I type /startcamera, and this is the problem:
http://imageshack.us/a/img89/9923/samp009qnn.png

And this must be the solution when I type /startcamera:
http://imageshack.us/a/img35/7871/samp000xdz.png
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)