From 477794f95ce9b75aa3d6653e3f33fe4c57884eff Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 29 Mar 2024 14:19:18 +0100 Subject: [PATCH] add rotationx command --- src/world.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/world.rs b/src/world.rs index 996671f..41ccf39 100644 --- a/src/world.rs +++ b/src/world.rs @@ -536,6 +536,15 @@ pub fn load_defs( continue; } } + ["rotationx", rotation_x] => { + if let Ok(rotation_x_float) = rotation_x.parse::() { + state.rotation = Quat::from_rotation_x(PI * rotation_x_float); + } + else { + error!("Can't parse float: {line}"); + continue; + } + } ["rotationy", rotation_y] => { if let Ok(rotation_y_float) = rotation_y.parse::() { state.rotation = Quat::from_rotation_y(PI * rotation_y_float);