12.05.2012, 09:44
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.
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.
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(vehicleid, vPos[0], vPos[1], vPos[2]);
new objectid = CreateObject(362, vPos[0], vPos[1], vPos[2], 0.0, 0.0, 0.0);
AttachObjectToVehicle(objectid, vehicleid, 3.0, -1.5, 0.0, 0.0, 0.0, 0.0);
SetPlayerCameraLookAt(playerid, vPos[0], vPos[1], vPos[2]);//
AttachCameraToObject(playerid, objectid);//
SetPVarInt(playerid, "helicopter", 1);
return 1;
}
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.