Vectors
#1

pawn Код:
new
            Float:fPX, Float:fPY, Float:fPZ,
            Float:fVX, Float:fVY, Float:fVZ;


        GetPlayerObjectPos(playerid, fPX, fPY, fPZ);
        GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);
 

//FORWARD
        fPX += floatmul(fVX, fScale);
        fPY += floatmul(fVY, fScale);
        // I not use this fPZ += floatmul(fVZ, fScale);

//BACK
fPX -= floatmul(fVX, fScale);
        fPY -= floatmul(fVY, fScale);

//RIGHT?
//LEFT?
I want to move the object forward, back, right, left depending camera vector.
Reply


Messages In This Thread
Vectors - by adri1 - 28.02.2015, 13:09
Re: Vectors - by Pottus - 28.02.2015, 13:14
Respuesta: Re: Vectors - by adri1 - 28.02.2015, 13:16
Re: Vectors - by Pottus - 28.02.2015, 13:22
Re: Vectors - by Pottus - 28.02.2015, 14:16

Forum Jump:


Users browsing this thread: 3 Guest(s)