Use locals, rather than matrices, to compute forward/up vectors.

This commit is contained in:
Nolan Darilek 2021-04-12 13:09:03 -05:00
parent 69dc601029
commit 5982c63416

View File

@ -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,