Skip to main content

look_to_mat3a

Function look_to_mat3a 

Source
pub fn look_to_mat3a(
    dir: Vec3,
    up: Vec3,
    fwd_axis: Vec3,
    up_axis: Vec3,
) -> Mat3A
Expand description

Returns a Mat3A model rotation from forward direction and up.

fwd_axis and up_axis are the object’s local forward and up axes. The rotation maps fwd_axis onto dir and up_axis onto up.

§Panics

Will panic if any argument is not normalized, if fwd_axis and up_axis are not perpendicular, or if dir and up are parallel, when glam_assert is enabled.