13.02.2013, 19:22
If you uses flymode filterscript or other scripts that uses it, you'll find that the camera only moves along the x/y-axis very little, when the camera is pointing completely downwards and do front/back + left/right movements.
In the case when the camera is pointing downwards, the x and y camera vector are too small compared to the z vector, so that it moves very little on the x-y coordinate plane as compared to the z one.
I tried many methods but I still can't make a good solution (something similar to MTA's as reference).
Are there any better methods to solve the problem?
pawn Code:
case MOVE_BACK_LEFT:
{
X = CP[0]+(-OFFSET_X - OFFSET_Y);
Y = CP[1]+(-OFFSET_Y + OFFSET_X);
Z = CP[2]-OFFSET_Z;
}
case MOVE_BACK_RIGHT:
{
X = CP[0]+(-OFFSET_X + OFFSET_Y);
Y = CP[1]+(-OFFSET_Y - OFFSET_X);
Z = CP[2]-OFFSET_Z;
}
case MOVE_FORWARD_LEFT:
{
X = CP[0]+(OFFSET_X - OFFSET_Y);
Y = CP[1]+(OFFSET_Y + OFFSET_X);
Z = CP[2]+OFFSET_Z;
}
case MOVE_FORWARD_RIGHT:
{
X = CP[0]+(OFFSET_X + OFFSET_Y);
Y = CP[1]+(OFFSET_Y - OFFSET_X);
Z = CP[2]+OFFSET_Z;
}
I tried many methods but I still can't make a good solution (something similar to MTA's as reference).
Are there any better methods to solve the problem?