GetPlayerCameraPos problemo
#1

I've been messing with it lately and I've noticed how a player's camera position isn't updated all too frequently. I'd venture to say that it updates roughly every second.

My question is simply the following: are there any plans on finding a fix for this problem?

I'd prefer to hear from someone actually working on SA-MP at the moment (I believe Kye is the only one doing so), but I doubt I would for those whom are are likely busy. Though hearing from anyone who's in on the development gig is all right so long as they can give me an appropriate response.

Thanks.




EDIT: It seems that the camera position updates at a faster rate while you're moving around, is there any way that you guys could make it update at such a rate all the time?
Reply
#2

if i understand you right, you mean you want a moving camera on player class selection, then use a timer updates every what ever seconds.
Reply
#3

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
if i understand you right, you mean you want a moving camera on player class selection, then use a timer updates every what ever seconds.
No, take a peek at the following bit of code:
Код:
public OnPlayerConnect(playerid)
{
	if(!IsPlayerNPC(playerid))
		CameraPosCheck(playerid);

	return 0;
}

forward CameraPosCheck(playerid);
public CameraPosCheck(playerid)
{
	if(IsPlayerConnected(playerid)))
	{
	    new
	        Float:p[3];
	        
		GetPlayerCameraPos(playerid, p[0], p[1], p[2]);
		
		printf("%f, %f, %f",
			p[0],
			p[1],
			p[2]);

		SetTimerEx("CameraPosCheck", 100, 0, "i", playerid);
	}

	return 0;
}
Remain still and move your camera about for awhile. You will notice that even though you've moved your camera, its position doesn't update until about a second later.
Try moving your character now while moving your camera; it updates at a far faster rate than when your character isn't moving.

I simply want the camera to update at the same rate that it would if your character was moving, regardless of whether or not your character is moving.
Reply
#4

It updates as often as OnPlayerUpdate, which updates more often if you are moving.
Reply
#5

Quote:
Originally Posted by Daren_Jacobson
Посмотреть сообщение
It updates as often as OnPlayerUpdate, which updates more often if you are moving.
Is there any way to make it update faster whilst not moving about?
Reply
#6

I would say no, but I don't know.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)