• 0 Vote(s) - 0 Average
• 1
• 2
• 3
• 4
• 5
 Tutorial VectorNormalize, VectorDot Yamato OMA Posts: 3,535 Threads: 420 Joined: Dec 2010 Reputation: 106 12-24-2012, 14:37 Hello Its been a long time since I havent made any tutorial, this one is about 2 vector commands. The first one is VectorNormalize, it returns you the normalized vector of a vector, it works this way: Code:`VectorNormalize( vector )` Example: Code:```vector = ( 1, 1, 0 ); vectornormalized = VectorNormalize( vector );``` The previous example will return you the vector ( 1 / sqrt( 2 ), 1 / sqrt( 2 ), 0 ), this means each component of the vector divided by the vectors module (lenght) The second command is VectorDot, it returns you the geometrical vector dot of 2 vectores that you enter in the function: Code:`VectorDot( vector 1, vector 2 )` Examples of use: Code:```vector = VectorDot( ( 0, 1, 0 ), ( 5, 1, 1 ) ); vector2 = VectorDot( ( 1, 0, 0 ), ( 2, 2, 2 ) );``` You might know that the result of this operation is a number, not a vector. I hope you have learnt something new Thanks for reading, @Yamato iAegle ItsModder Posts: 1,830 Threads: 104 Joined: Jan 2011 Reputation: 46 12-24-2012, 18:30 Most unclear tutorial ever. (08-10-2011, 12:58)Pozzuh Wrote: Se7en Wrote:Stealed, from cod4 mod ...look who's talking [Release] Old School Mod v2.2 [Release] Scroll menu Yamato OMA Posts: 3,535 Threads: 420 Joined: Dec 2010 Reputation: 106 12-24-2012, 18:33 (12-24-2012, 18:30)iAegle Wrote: Most unclear tutorial ever. What else can I say about these things? They are math functions JariZ anxiety fashion hunt))) Posts: 5,320 Threads: 300 Joined: Feb 2011 Reputation: 149 12-24-2012, 18:34 @iAegle It simply returns ( 1 / sqrt( 2 ), 1 / sqrt( 2 ), 0 ), what's so hard to understand? iAegle ItsModder Posts: 1,830 Threads: 104 Joined: Jan 2011 Reputation: 46 12-24-2012, 19:03 (12-24-2012, 18:34)JariZ Wrote: @iAegle It simply returns ( 1 / sqrt( 2 ), 1 / sqrt( 2 ), 0 ), what's so hard to understand? Ok (08-10-2011, 12:58)Pozzuh Wrote: Se7en Wrote:Stealed, from cod4 mod ...look who's talking [Release] Old School Mod v2.2 [Release] Scroll menu Pozzuh Wash behind your ears! Posts: 5,135 Threads: 241 Joined: Nov 2010 Reputation: 100 12-25-2012, 11:11 It doesn't really explain any uses for it. This isn't really a tutorial, might as well be a list of gsc functions, tbh.

Forum Jump:

 Users browsing this thread: 1 Guest(s)