RotFromAxes
Function. Outputs a rotation (quaternion) calculated from two axes of a coordinate system.
You provide two axes: a 'fixed' axis and a 'desired' axis. The Type property selects which axes they are (e.g., Y+X means Y is fixed, X is desired). The resulting rotation describes a coordinate system where the fixed axis matches exactly the input, and the desired axis is as close as possible to the input.
This is useful for orienting particles along a direction while maintaining an up vector.
Properties & inputs:
- Type (property): Selection of fixed + desired axes (e.g., Y+X, Z+Y, etc.).
- X, Y, Z (input | property): The axis vectors.
Output:
- Rotation (quaternion) calculated from the two axes.