From 5982c6341685c140f3d99c699e2477cd57e34d1d Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Mon, 12 Apr 2021 13:09:03 -0500 Subject: [PATCH] Use locals, rather than matrices, to compute forward/up vectors. --- src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 793448f..f365e88 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -327,9 +327,8 @@ fn listener_update( }) .or_else(|| transform.cloned()); if let Some(transform) = transform { - let matrix = transform.compute_matrix().inverse(); - let look = matrix.x_axis; - let up = matrix.z_axis; + let look = transform.local_x(); + let up = transform.local_z(); context .set_position([ transform.translation.x,