added yaw to local floor

This commit is contained in:
ForTehLose
2024-09-03 15:32:04 -04:00
parent 1f016501f3
commit cd14a2455b

View File

@@ -171,7 +171,9 @@ fn update_local_floor_transforms(
let mut calc_floor = head.clone();
calc_floor.translation.y = 0.0;
//TODO: use yaw
calc_floor.rotation = Quat::IDENTITY;
let (y, x, z) = calc_floor.rotation.to_euler(EulerRot::YXZ);
let new_rot = Quat::from_rotation_y(y);
calc_floor.rotation = new_rot;
for (mut transform) in &mut local_floor {
*transform = calc_floor;
}