add rotationx command
This commit is contained in:
parent
9d5c7a4947
commit
477794f95c
|
@ -536,6 +536,15 @@ pub fn load_defs(
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
["rotationx", rotation_x] => {
|
||||||
|
if let Ok(rotation_x_float) = rotation_x.parse::<f32>() {
|
||||||
|
state.rotation = Quat::from_rotation_x(PI * rotation_x_float);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
error!("Can't parse float: {line}");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
["rotationy", rotation_y] => {
|
["rotationy", rotation_y] => {
|
||||||
if let Ok(rotation_y_float) = rotation_y.parse::<f32>() {
|
if let Ok(rotation_y_float) = rotation_y.parse::<f32>() {
|
||||||
state.rotation = Quat::from_rotation_y(PI * rotation_y_float);
|
state.rotation = Quat::from_rotation_y(PI * rotation_y_float);
|
||||||
|
|
Loading…
Reference in a new issue