camera "float" < help!
#1

pawn Код:
new Text:Textdraw1;
new cam[MAX_PLAYERS];
forward CamWithPlane(playerid, vehicleid);
public OnGameModeInit()
{
Textdraw1 = TextDrawCreate(292.000000,186.000000," I~n~- -~n~ I");
/* this look like:
 I
- -
 I
(target)
*/

//more of those codes....
return 1;
}

public OnGameModeExit()
{
TextDrawDestroy(Textdraw1);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid, Textdraw1);
return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetVehicleModel(vehicleid) == 476) //rustler
    {
    TextDrawShowForPlayer(playerid, Textdraw1);
    cam[playerid] = SetTimerEx("CamWithPlane", 50, true, "ii", playerid, vehicleid);
    }
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
  if(GetVehicleModel(vehicleid) == 476) //rustler
    {
    TextDrawHideForPlayer(playerid, Textdraw1);
    KillTimer(cam[playerid]);
    }
    return 1;
}

public CamWithPlane(playerid, vehicleid)
{
new Float:lol[3];
GetVehiclePos(vehicleid, lol[0], lol[1], lol[2]);
SetPlayerCameraPos(playerid, lol[0], lol[1], lol[2]);
//what now? (floats)
SetPlayerCameraLookAt(playerid, >>?<<);
}
how to change the 'camera look at' in front of the vehicle?
Reply
#2

bump
Reply
#3

You're using a timer that will cause your camera to change positions 200 times a second. You will get a major dosage of lag at that rate. I wouldn't even suggest you use that function in OnPlayerUpdate because in either case, it's going to look horrible in-game.
Reply
#4

ye... that doesn't help me...
Reply
#5

*BUMP*
Reply
#6

this topic in page 3!
why no one reply's? i mean 60 views and no one reply useful reply? is that so hard?
Reply
#7

Quote:
Originally Posted by Joe Staff
You're using a timer that will cause your camera to change positions 200 times a second. You will get a major dosage of lag at that rate. I wouldn't even suggest you use that function in OnPlayerUpdate because in either case, it's going to look horrible in-game.
Reply
#8

Quote:
Originally Posted by Daem
ye... that doesn't help me...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)