Camera Positions & Spectating
#4

I too have had problems making a smooth server entrance. The main point is the delay timer, and using InterpolateCameraPos with the to and from coordinates the same. Dumb, but it works.
pawn Code:
public OnPlayerConnect(playerid)
{
    SetTimerEx("SetJoinCamera", 100, false, "d", playerid);
    return 1;
}
public SetJoinCamera(playerid)
{
    TogglePlayerSpectating(playerid, 1);
    switch(random(5))
    {
        case 0:
        {
            InterpolateCameraPos(playerid,1006.8538, 282.1343, 85.7583, 1006.8538, 282.1343, 85.7583, 1000, CAMERA_CUT);
            InterpolateCameraLookAt(playerid, 1007.8502, 282.1040, 85.5879, 1007.8502, 282.1040, 85.5879, 1000, CAMERA_CUT);
        }
        case 1:
        {
            InterpolateCameraPos(playerid,646.6002, -594.4451, 15.9723, 646.6002, -594.4451, 15.9723, 1000, CAMERA_CUT);
            InterpolateCameraLookAt(playerid,646.9472, -593.6812, 16.1468, 645.9472, -593.6812, 16.1468, 1000, CAMERA_CUT);
        }
        case 2:
        {
            InterpolateCameraPos(playerid, 651.7802, -494.6155, 30.2279, 651.7802, -494.6155, 30.2279, 1000, CAMERA_CUT);
            InterpolateCameraLookAt(playerid, 652.5730, -493.9993, 29.9173, 652.5730, -493.9993, 29.9173, 1000, CAMERA_CUT);
        }
        case 3:
        {
            InterpolateCameraPos(playerid, 187.5941, -217.7278, 1.9320, 187.5941, -217.7278, 1.9320, 1000, CAMERA_CUT);
            InterpolateCameraLookAt(playerid, 188.3079, -217.0226, 2.0968, 188.3079, -217.0226, 2.0968, 1000, CAMERA_CUT);
        }
        default:
        {
            InterpolateCameraPos(playerid, 94.6793, -215.7012, 3.1615, 94.6793, -215.7012, 3.1615, 1000, CAMERA_CUT);
            InterpolateCameraLookAt(playerid, 94.1885, -216.5767, 3.2614, 94.1885, -216.5767, 3.2614, 1000, CAMERA_CUT);
        }
    }
    return 1;
}
Reply


Messages In This Thread
Camera Positions & Spectating - by 2KY - 03.05.2012, 19:50
Re: Camera Positions & Spectating - by .FuneraL. - 03.05.2012, 19:54
Re: Camera Positions & Spectating - by 2KY - 03.05.2012, 19:56
Re: Camera Positions & Spectating - by ReneG - 03.05.2012, 21:14
Re: Camera Positions & Spectating - by 2KY - 03.05.2012, 21:20
Re: Camera Positions & Spectating - by ReneG - 03.05.2012, 21:31

Forum Jump:


Users browsing this thread: 3 Guest(s)