Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: Fjose on May 24, 2015, 11:56 PM

Title: [DOUBT] About vehicles
Post by: Fjose on May 24, 2015, 11:56 PM
Someone know why always when the vehicle is created, it's positioned to the North and not the correct rotation.
Title: Re: [DOUBT] About vehicles
Post by: Diego^ on May 25, 2015, 01:56 AM
Also I do not understand it! :-\
Title: Re: [DOUBT] About vehicles
Post by: Stormeus on May 25, 2015, 02:37 AM
Did you convert to radians?
Title: Re: [DOUBT] About vehicles
Post by: karan20000000000 on May 25, 2015, 05:30 AM
Whenever you want to spawn vehicles like they were in 0.3, use  vehicle.EulerAngle.z .
Thanks to ThunderStorm for telling that ;)
Title: Re: [DOUBT] About vehicles
Post by: Diego^ on May 25, 2015, 02:39 PM
Thank karan, helped a lot :D
Title: Re: [DOUBT] About vehicles
Post by: Fjose on May 25, 2015, 02:48 PM
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?

Title: Re: [DOUBT] About vehicles
Post by: Stormeus on May 25, 2015, 03: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.
Title: Re: [DOUBT] About vehicles
Post by: Fjose on May 25, 2015, 03:08 PM
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