Polarith AI
1.8

◆ ChangeOrientation()

void ChangeOrientation ( Vector3  up,
ref Vector3  vec 
)
protectedinherited

Flips a vector from XY-plane according to an up vector.

Useful to transform a vector lying in the XZ-plane if the attached AIMPlanarSensor is not in the XY-plane, e.g., XZ-plane. Note that vec is a reference, and thus, is changed inside the function.

Parameters
up3d vector that is perpendicular to the target plane
vecReference to the target vector that should be flipped.
Imprint