length of a normalised vector (or direction vector) ?

Started by RemiD, November 01, 2024, 10:22:48

Previous topic - Next topic

RemiD

hi  :)

just a clarification.

from what i remember, the length of a normalised vector (or direction vector) must be 1.0.

correct ?

and the math formula is :
vector_length = sqr( ( vector_x * vector_x ) + ( vector_y * vector_y ) + ( vector_z * vector_z ) )

normal_x = vector_x / vector_length :  normal_y = vector_y / vector_length : normal_z = vector_z / vector_length

correct ?

and then we can multiply this normal vector (or direction vector) by a speed or force to get a new translation vector.

correct ?

this seems to work well, but just to be sure.

Derron

yes, a normalized vector (a unit vector) must have a length of 1 - and only indicates/represents the "direction" (which is why you call it "direction vector" too)

Yes. Vector length is the square root of the sum of the 3 axis' multiplied with each other. 

And thus makes your third one correct too - multiply the "direction" with the "strength" and you get the translation vector.


bye
Ron


blinkok

#3
AGK has a numbert of inbuilt vector commands (That do not need to be normalized)
Sorry, thought it was AGK