Object Facing Angle? -
-CaRRoT - 28.11.2012
Well... Eh - As you see.. I am working on a new Dynamic system.. Where you can Create an Object ID... Anyway - I am facing a problem with the facing angle
This is a Part of the code :
Quote:
InfoBoardInfo[ID][ObjectID] = CreateDynamicObject(MyObjectID, InfoBoardInfo[ID][MyObjectX]+0.5, InfoBoardInfo[ID][MyObjectY], InfoBoardInfo[ID][MyObjectZ]+0.2, 0, 0, InfoBoardInfo[ID][InfoBoardAngle],0,0,-1,250);
|
Which creates the Object.. Anyway..
P.S - InfoBoardAngle = The object Facing Angle.. It's declared above..
Anyway - This is how it appears :
In this image [2nd] - The object should appear infront of me not behind me.. -.-
Any Ideas ? Help would be appreciated.
[Note : It works when I am facing this side as in the First SS - But in the 2nd - It doesn't.]
Re: Object Facing Angle? -
-CaRRoT - 28.11.2012
Bump - Moved to the 2nd Page already.. Guys - I really need urgent help... Gonna give a Rep. Point to the one who'll help
Respuesta: Object Facing Angle? -
ThePhenix - 28.11.2012
What about it?
It will create the object in front of the player.
PHP код:
new ObjID = strval(params);
new Float:X, Float:Y, Float:Z, Float:Ang;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Ang);
X += (3 * floatsin(-Ang, degrees));
Y += (3 * floatcos(-Ang, degrees));
CreateObject(ObjID, X, Y, Z, 0.0, 0.0, Ang);
Re: Object Facing Angle? -
-CaRRoT - 29.11.2012
Nope - not working -.-
- Bump , 3rd page already.
Re: Object Facing Angle? -
ViniBorn - 29.11.2012
pawn Код:
GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
// Created by ******
new Float:a;
GetPlayerPos(playerid, x, y, a);
GetPlayerFacingAngle(playerid, a);
if (GetPlayerVehicleID(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
}
//For behind use
x -= (distance * floatsin(-a, degrees));
y -= (distance * floatcos(-a, degrees));
Re: Object Facing Angle? -
-CaRRoT - 03.12.2012
Bump - An't working btw.
Re: Object Facing Angle? -
ikkentim - 03.12.2012
Use what Viniborn said. There is a chance of 100% that it works. (or else you bugged up some script somewhere else.)
Re: Object Facing Angle? -
-CaRRoT - 03.12.2012
Actually ye - I re-tried using it and it worked , Thanks.