SA-MP Forums Archive
InterpolateCameraPos - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: InterpolateCameraPos (/showthread.php?tid=385552)



InterpolateCameraPos - jop9888 - 16.10.2012

Hee all,

I'm trying out the InterpolateCameraPos function, but it seems to bug alot.
Sometimes it doesnt start, or skips parts of the camera, and sometimes when i reset the camera with SetCameraBehindPlayer the server closes the connection..

Am i doing something wrong or is this an official bug?

Thanks in advance,

Jop9888


Re: InterpolateCameraPos - jop9888 - 17.10.2012

Since no one is responding, maybe some of the code will clear things up

pawn Код:
TogglePlayerSpectating(playerid, 1);
        InterpolateCameraPos(playerid, -1.9223,-1240.7756,117.9103, 1142.4589,-717.8170,139.2966, 20000, CAMERA_MOVE);
        InterpolateCameraLookAt(playerid,186.6470,-1261.1404,78.2794,1280.0114,-640.1159,106.2128, 20000, CAMERA_MOVE);
This is put under onplayerrequestclass

Then when a player logs in i put:

pawn Код:
TogglePlayerSpectating(playerid, 0);
        SetCameraBehindPlayer(playerid);
Well most of the times the server closes the connection, am i doing something really wrong here??


Re: InterpolateCameraPos - RedFusion - 17.10.2012

Try it without spectate-mode on


Re: InterpolateCameraPos - jop9888 - 17.10.2012

Note: Use TogglePlayerSpectating to make objects stream in for the player while the camera is moving. You can reset the camera behind the player with SetCameraBehindPlayer.

If i wouldn't, the objects won't stream in nicely, i fixed it by adding spawnplayer to the login code, only disadvantage is that the player can't select a skin at the beginning, but that's alright