[DOUBT] About vehicles

Started by Fjose, May 24, 2015, 11:56 PM

Previous topic - Next topic

Fjose

Someone know why always when the vehicle is created, it's positioned to the North and not the correct rotation.

Diego^

Also I do not understand it! :-\
BRL's Developer.

Stormeus

Did you convert to radians?

karan20000000000

Whenever you want to spawn vehicles like they were in 0.3, use  vehicle.EulerAngle.z .
Thanks to ThunderStorm for telling that ;)
With regards,
KP
------------------------------------------

Diego^

Thank karan, helped a lot :D
BRL's Developer.

Fjose

#5
Quote from: stormeus on May 25, 2015, 02:37 AMDid you convert to radians?

No, only I copied the function how is. e.g:
" + veh.Model + "," + veh.World + "," + veh.Pos.x + "," + veh.Pos.y + "," + veh.Pos.z + "," + veh.Angle + "," + veh.Colour1 + "," + veh.Colour2;
this is the saved for create the vehicle, nothing more.

EDIT:

function DegtoRad( degree ) return degree * 0.0174533;I have to multiply it for the angle z?


Stormeus

That won't work because the Angle is a Quaternion with X, Y, Z, and W components. You need to use veh.EulerAngle.Z or store all the components.

Fjose

#7
Quote from: stormeus on May 25, 2015, 03:04 PMThat won't work because the Angle is a Quaternion with X, Y, Z, and W components. You need to use veh.EulerAngle.Z or store all the components.

ok, i'll test it

EDIT:

Working thanks ;D