[DOUBT] About vehicles

Fjose

  • Jr. Member
  • Programmer
  • Posts: 90
[DOUBT] About vehicles
« on May 25th, 2015, 12:56 AM »
Someone know why always when the vehicle is created, it's positioned to the North and not the correct rotation.

Diego^

  • Jr. Member
  • LBR Member.
  • Posts: 89
[DOUBT] Re: About vehicles
« Reply #1, on May 25th, 2015, 02:56 AM »
Also I do not understand it! :-\
BRL's Developer.

Stormeus

  • VC:MP Developer
  • oh god how did i get here im not good w computer
  • Posts: 1,128
[DOUBT] Re: About vehicles
« Reply #2, on May 25th, 2015, 03:37 AM »
Did you convert to radians?

karan20000000000

  • Jr. Member
  • KP
  • Posts: 66
[DOUBT] Re: About vehicles
« Reply #3, on May 25th, 2015, 06:30 AM »
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^

  • Jr. Member
  • LBR Member.
  • Posts: 89
[DOUBT] Re: About vehicles
« Reply #4, on May 25th, 2015, 03:39 PM »
Thank karan, helped a lot :D
BRL's Developer.

Fjose

  • Jr. Member
  • Programmer
  • Posts: 90
[DOUBT] Re: About vehicles
« Reply #5, on May 25th, 2015, 03:48 PM »Last edited on May 25th, 2015, 04:07 PM
Quote from stormeus on May 25th, 2015, 03:37 AM
Did 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:

Code: [Select]
function DegtoRad( degree ) return degree * 0.0174533;
I have to multiply it for the angle z?


Stormeus

  • VC:MP Developer
  • oh god how did i get here im not good w computer
  • Posts: 1,128
[DOUBT] Re: About vehicles
« Reply #6, on May 25th, 2015, 04:04 PM »
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

  • Jr. Member
  • Programmer
  • Posts: 90
[DOUBT] Re: About vehicles
« Reply #7, on May 25th, 2015, 04:08 PM »Last edited on May 27th, 2015, 04:43 PM
Quote from stormeus on May 25th, 2015, 04:04 PM
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.
ok, i'll test it

EDIT:

Working thanks ;D