Calculating xangle? (rotx) ?
#9

pawn Code:
stock RotatePoint(& Float: X, & Float: Y, & Float: Z, Float: pitch, Float: yaw, Float: distance) {
    X -= (distance * floatcos(pitch, degrees) * floatsin(yaw, degrees));
    Y += (distance * floatcos(pitch, degrees) * floatcos(yaw, degrees));
    Z += (distance * floatsin(pitch, degrees));
}
pawn Code:
stock GetXYZOfVehicle(vehicleid, & Float: X, & Float: Y, & Float: Z, Float: pitch, Float: distance) {
    static
        Float: yaw;
    if(GetVehicleZAngle(vehicleid, yaw)) {
        GetVehiclePos(vehicleid, X, Y, Z);
        RotatePoint(X, Y, Z, pitch, yaw, distance);
        return true;
    }
    return false;
}
Reply


Messages In This Thread
Calculating xangle? (rotx) ? - by Kar - 23.08.2011, 20:26
Re: Calculating xangle? (rotx) ? - by Backwardsman97 - 23.08.2011, 20:30
Re: Calculating xangle? (rotx) ? - by Kar - 23.08.2011, 20:42
Re: Calculating xangle? (rotx) ? - by Kar - 24.08.2011, 20:39
Re: Calculating xangle? (rotx) ? - by Kar - 26.08.2011, 06:02
Re: Calculating xangle? (rotx) ? - by Babul - 26.08.2011, 11:06
Re: Calculating xangle? (rotx) ? - by Lorenc_ - 26.08.2011, 11:32
Re: Calculating xangle? (rotx) ? - by Pinguinn - 26.08.2011, 11:34
AW: Calculating xangle? (rotx) ? - by Nero_3D - 26.08.2011, 15:00
Re: Calculating xangle? (rotx) ? - by Kar - 28.08.2011, 09:40
AW: Re: Calculating xangle? (rotx) ? - by Nero_3D - 28.08.2011, 13:42
Re: Calculating xangle? (rotx) ? - by Kar - 28.08.2011, 14:11

Forum Jump:


Users browsing this thread: 3 Guest(s)