Vehicle Offsets from Vehicle Position and Other Position
#1

How is this achieved?
Reply
#2

Explain more..
Reply
#3

Example
pawn Код:
new vehicleid, Float:x, Float:y, Float:z, Float:angle;
            vehicleid = GetPlayerVehicleID(playerid);
            if(vehicleid)
            {
                GetVehiclePos(vehicleid, x, y, z);
                GetVehicleZAngle(vehicleid, angle);
                AttachObjectToVehicle(objectid, vehicleid, fX - x, fY - y, fZ - z, 0.0, 0.0, angle);
            }
            else
            {
                GetPlayerPos(playerid, x, y, z);
                GetPlayerFacingAngle(playerid, angle);
                AttachObjectToPlayer(objectid, playerid, fX - x, fY - y, fZ - z, 0.0, 0.0, angle);
            }
This only works when the player/vehicle has the angle 0.0, i would like this to work at every angle
(fX, fY, fZ is the position of the object)
Reply
#4

Been asked a number of times. Not even the most advance scripters / math maniacs can do this.

Maybe Kalcor can add something to help us with this infuture to convert world angles to vehicle angles attachment angles.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)