InterpolateCameraPos
#1

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
Reply
#2

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??
Reply
#3

Try it without spectate-mode on
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)