added yaw to local floor
This commit is contained in:
@@ -171,7 +171,9 @@ fn update_local_floor_transforms(
|
|||||||
let mut calc_floor = head.clone();
|
let mut calc_floor = head.clone();
|
||||||
calc_floor.translation.y = 0.0;
|
calc_floor.translation.y = 0.0;
|
||||||
//TODO: use yaw
|
//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 {
|
for (mut transform) in &mut local_floor {
|
||||||
*transform = calc_floor;
|
*transform = calc_floor;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user