Quote:
Originally Posted by Threshold
You're changing the camera's LookAt before you even attach the camera. Try this:
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;
}
If this just results in your camera looking down or something similar, you might have to use a CAMERA_MOVE as a cut:
PHP код:
SetPlayerCameraLookAt(playerid, coordsto[0], coordsto[1], coordsto[2], CAMERA_MOVE);
Or alternatively look at InterpolateCameraLookAt.
|
It tried this command and this happens :
https://www.youtube.com/watch?v=B1YhQOQvCQs
It's weird becouse it sets the camera on different position than player is, and the camera is no longer attached to the object.
Why? Any solution?