SA-MP Forums Archive
[Bug] Camera look at - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: [Bug] Camera look at (/showthread.php?tid=341864)



[Bug] Camera look at - Atrox95 - 12.05.2012

Hello,
I want to change the player's camera look positon after I attached the camera to an object which is attached to a vehicle.
PHP код:
if(strcmp(cmdtext"/test"true) == 0) {
        new 
Float:vPos[3], vehicleid GetPlayerVehicleID(playerid);
        
GetVehiclePos(vehicleidvPos[0], vPos[1], vPos[2]);
        new 
objectid CreateObject(362vPos[0], vPos[1], vPos[2], 0.00.00.0);
        
AttachObjectToVehicle(objectidvehicleid3.0, -1.50.00.00.00.0);
        
SetPlayerCameraLookAt(playeridvPos[0], vPos[1], vPos[2]);//
        
AttachCameraToObject(playeridobjectid);//
        
SetPVarInt(playerid"helicopter"1);
        return 
1;
    } 
If I do SetPlayerCameraLookAt and then AttachCameraToObject the player cannot move his camera and the camera look position is not at the definied one.
If I do AttachCameraToObject and then SetPlayerCameraLookAt the new camera look position works, but the camera isn't still attached and the position is somewhere.

I hope for a bug fix.