Trying to make it so it sees the player.... (CameraLookAt,CameraPosition) -
Swyft™ - 22.09.2013
So what I was doing basically, I was making the playerid sit in the chair, and then I have another position facing the person that is sitting.....
pawn Код:
AddPlayerClass(35,2.9429,28.6322,1199.5938,0.5921,0,0,0,0,0,0); // spot
AddPlayerClass(35,1.6159,30.1600,1199.5938,213.4925,0,0,0,0,0,0); // CameraPos
pawn Код:
SetPlayerCameraPos(playerid, 1.6159,30.1600,1199.5938);
SetPlayerCameraLookAt(playerid, 1.6159,30.1600,1199.5938);
SetPlayerPos(playerid, 2.9429,28.6322,1199.5938);
SetPlayerInterior(playerid, 1);
ApplyAnimation(playerid,"PED","SEAT_idle", 4.0, 1, 0, 0, 0, 0);
Not working out too well... It's just facing the plane
Re: Trying to make it so it sees the player.... (CameraLookAt,CameraPosition) -
JamesH - 22.09.2013
pawn Код:
SetPlayerPos(playerid, 1.808619,32.384357,1199.593750);
SetPlayerInterior(playerid, 1);
SetPlayerVirtualWorld(playerid, 1);
ApplyAnimation(playerid,"PED","SEAT_idle", 4.0, 1, 0, 0, 0, 0);
you dont need these player classes or what every they are.
Re: Trying to make it so it sees the player.... (CameraLookAt,CameraPosition) -
Swyft™ - 22.09.2013
I don't think you are understanding what I said.
Re: Trying to make it so it sees the player.... (CameraLookAt,CameraPosition) -
EiresJason - 22.09.2013
So; when someone types a command, lets say "/sit". It will teleport them to that position and set the players camera looking at themselves sitting down? Is that correct?
Try this:
pawn Код:
SetPlayerPos(playerid, 2.9429,28.6322,1199.5938);
SetPlayerInterior(playerid, 1);
ApplyAnimation(playerid,"PED","SEAT_idle", 4.0, 1, 0, 0, 0, 0);
SetPlayerCameraPos(playerid, 1.6159,30.1600,1199.5938);
SetPlayerCameraLookAt(playerid, 2.9429,28.6322,1199.5938,2);
Re: Trying to make it so it sees the player.... (CameraLookAt,CameraPosition) -
Swyft™ - 22.09.2013
No, this is for when the player registers.
Re: Trying to make it so it sees the player.... (CameraLookAt,CameraPosition) -
EiresJason - 22.09.2013
Ooh, I see. Did you try the code I posted? What happened?
Re: Trying to make it so it sees the player.... (CameraLookAt,CameraPosition) -
Swyft™ - 22.09.2013
IT worked but the dude isn't sitting in the seat, probably a faulty on my end.
Re: Trying to make it so it sees the player.... (CameraLookAt,CameraPosition) -
EiresJason - 22.09.2013
I think it's just sometimes ApplyAnimation needs to be applied twice.
Maybe try that
Re: Trying to make it so it sees the player.... (CameraLookAt,CameraPosition) -
Swyft™ - 22.09.2013
No it's not that... The player is sitting, but not in the seat, he is 25% off to the side. xD
Re: Trying to make it so it sees the player.... (CameraLookAt,CameraPosition) -
EiresJason - 22.09.2013
Ooh xD