animation make player not move just change angle with arrow keys
#5

In that fs i press a w s d and it change my angle

if(PRESSED(KEY_ANALOG_RIGHT))
{
GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
static Float: n1X, Float: n1Y;
if(Degree[playerid] >= 360) Degree[playerid] = 0;
Degree[playerid] += Speed;
n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
}
if(PRESSED(KEY_ANALOG_LEFT))
{
GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
static Float: n1X, Float: n1Y;
if(Degree[playerid] >= 360) Degree[playerid] = 0;
Degree[playerid] -= Speed;
n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
}

Here just for numpad 4 6
Reply


Messages In This Thread
animation make player not move just change angle with arrow keys - by Bussyman - 29.04.2017, 13:45
Re: animation make player not move just change angle with arrow keys - by Sebz - 29.04.2017, 14:03
Re: animation make player not move just change angle with arrow keys - by Bussyman - 29.04.2017, 14:07
Re: animation make player not move just change angle with arrow keys - by AndreiWow - 29.04.2017, 14:38
Re: animation make player not move just change angle with arrow keys - by Bussyman - 29.04.2017, 16:05

Forum Jump:


Users browsing this thread: 2 Guest(s)