20.12.2018, 02:30
You're changing the camera's LookAt before you even attach the camera. Try this:
If this just results in your camera looking down or something similar, you might have to use a CAMERA_MOVE as a cut:
Or alternatively look at InterpolateCameraLookAt.
PHP код:
CMD:objtest(playerid)
{
new
Float:coordsfrom[3] = {2056.173828, 794.064025, 35.411571},
Float:coordsto[3] = {2055.529785, 1132.966064, 40.313831}
;
TogglePlayerControllable(playerid, 0);
SnowObject[playerid] = CreateDynamicObject(18864, coordsfrom[0], coordsfrom[1], coordsfrom[2], 0, 0, 0, -1, -1, -1, -1);
AttachCameraToDynamicObject(playerid, SnowObject[playerid]);
MoveDynamicObject(SnowObject[playerid], coordsto[0], coordsto[1], coordsto[2], 19);
SetPlayerCameraLookAt(playerid, coordsto[0], coordsto[1], coordsto[2]);
return 1;
}
PHP код:
SetPlayerCameraLookAt(playerid, coordsto[0], coordsto[1], coordsto[2], CAMERA_MOVE);