Vehicle Angle is not taken correctly from sserver.conf

Started by Fjose, Jan 29, 2015, 10:09 PM

Previous topic - Next topic

Fjose

In this case, I was importing the vehicles from my 0.3 server to 0.4, all those coordinates are located in the 'server.conf', In the next code everything looks good but for any reason the angle is not taken how must be. it's like if the server is ignoring this part.  In the principle I was thinking it the problem was caused by use negative values in the 'x coordinate', but after see sk's post, I realized it the problem was with the angle how he said.

<Vehicle model="224" world="1" x="-842.2524" y="-909.7036" z="10.8677" angle="356.8192" col1="0" col2="0"/>
<Vehicle model="224" world="1" x="-896.0913" y="-999.1013" z="13.9701" angle="187.0791" col1="0" col2="0"/>


EK.IceFlake

It uses radians not degrees. Check out (idk)'s awesome function DegtoRad and RadtoDeg, you will find it when looking at the forum.

.

Quote from: NE.CrystalBlue on Jan 30, 2015, 07:01 AMIt uses radians not degrees. Check out (idk)'s awesome function DegtoRad and RadtoDeg, you will find it when looking at the forum.

I believe this is the discussion you are talking about.
.

EK.IceFlake

Quote from: S.L.C on Jan 30, 2015, 07:05 AM
Quote from: NE.CrystalBlue on Jan 30, 2015, 07:01 AMIt uses radians not degrees. Check out (idk)'s awesome function DegtoRad and RadtoDeg, you will find it when looking at the forum.

I believe this is the discussion you are talking about.
Yes thanks.

Fjose

Just a last thing. Someone know how get the angle from the 'server.conf' because when I use veh.Angle only shows '(1,0,0,0)' and if I use veh.Rotation '(0,0,0,1)' >.>

 function ed()
 {
for ( local a = 0; a <= GetVehicleCount(); a++ )
{
local veh = FindVehicle( a );
if ( veh )
{
print( "ID: " + veh.ID + " - Model: " + veh.Model + " Angle " + veh.Angle + " Rotation: " + veh.Rotation );
}

}