mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-11 22:50:08 +00:00
fixed warnings
This commit is contained in:
@@ -277,8 +277,8 @@ impl CameraController {
|
||||
if self.pitch > 90.0f32.to_radians() {
|
||||
self.pitch = 90.0f32.to_radians();
|
||||
}
|
||||
if self.pitch < -90.0f32.to_radians() {
|
||||
self.pitch = -90.0f32.to_radians();
|
||||
if self.pitch < (-90.0f32).to_radians() {
|
||||
self.pitch = (-90.0f32).to_radians();
|
||||
}
|
||||
}
|
||||
MouseControlMode::Drag {
|
||||
|
||||
@@ -161,7 +161,7 @@ impl MoveGizmo {
|
||||
graph.link_nodes(smart_dot, origin);
|
||||
let (x_axis, x_arrow) = make_move_axis(
|
||||
graph,
|
||||
UnitQuaternion::from_axis_angle(&Vector3::z_axis(), -90.0f32.to_radians()),
|
||||
UnitQuaternion::from_axis_angle(&Vector3::z_axis(), (-90.0f32).to_radians()),
|
||||
Color::RED,
|
||||
"X",
|
||||
);
|
||||
|
||||
@@ -120,7 +120,7 @@ impl ScaleGizmo {
|
||||
|
||||
let (x_axis, x_arrow) = make_scale_axis(
|
||||
graph,
|
||||
UnitQuaternion::from_axis_angle(&Vector3::z_axis(), -90.0f32.to_radians()),
|
||||
UnitQuaternion::from_axis_angle(&Vector3::z_axis(), (-90.0f32).to_radians()),
|
||||
Color::RED,
|
||||
"X",
|
||||
);
|
||||
|
||||
@@ -129,7 +129,7 @@ impl SceneGizmo {
|
||||
Matrix4::new_translation(&Vector3::new(-1.50, 0.0, 0.0))
|
||||
* UnitQuaternion::from_axis_angle(
|
||||
&Vector3::z_axis(),
|
||||
-90.0f32.to_radians(),
|
||||
(-90.0f32).to_radians(),
|
||||
)
|
||||
.to_homogeneous(),
|
||||
Color::WHITE,
|
||||
@@ -142,7 +142,7 @@ impl SceneGizmo {
|
||||
Matrix4::new_translation(&Vector3::new(0.0, 0.0, 1.50))
|
||||
* UnitQuaternion::from_axis_angle(
|
||||
&Vector3::x_axis(),
|
||||
-90.0f32.to_radians(),
|
||||
(-90.0f32).to_radians(),
|
||||
)
|
||||
.to_homogeneous(),
|
||||
Color::BLUE,
|
||||
@@ -310,11 +310,11 @@ impl SceneGizmo {
|
||||
} else if closest == self.pos_x {
|
||||
Some(SceneGizmoAction::Rotate(CameraRotation {
|
||||
pitch: 0.0,
|
||||
yaw: -90.0f32.to_radians(),
|
||||
yaw: (-90.0f32).to_radians(),
|
||||
}))
|
||||
} else if closest == self.neg_y {
|
||||
Some(SceneGizmoAction::Rotate(CameraRotation {
|
||||
pitch: -90.0f32.to_radians(),
|
||||
pitch: (-90.0f32).to_radians(),
|
||||
yaw: 0.0,
|
||||
}))
|
||||
} else if closest == self.pos_y {
|
||||
@@ -330,7 +330,7 @@ impl SceneGizmo {
|
||||
} else if closest == self.pos_z {
|
||||
Some(SceneGizmoAction::Rotate(CameraRotation {
|
||||
pitch: 0.0,
|
||||
yaw: -180.0f32.to_radians(),
|
||||
yaw: (-180.0f32).to_radians(),
|
||||
}))
|
||||
} else if closest == self.center {
|
||||
Some(SceneGizmoAction::SwitchProjection)
|
||||
|
||||
+18
-18
@@ -689,9 +689,9 @@ impl RagdollPreset {
|
||||
hips,
|
||||
"RagdollLeftUpLegHipsBallJoint",
|
||||
Some(BallJointLimits {
|
||||
x: -80.0f32.to_radians()..80.0f32.to_radians(),
|
||||
y: -80.0f32.to_radians()..80.0f32.to_radians(),
|
||||
z: -80.0f32.to_radians()..80.0f32.to_radians(),
|
||||
x: (-80.0f32).to_radians()..80.0f32.to_radians(),
|
||||
y: (-80.0f32).to_radians()..80.0f32.to_radians(),
|
||||
z: (-80.0f32).to_radians()..80.0f32.to_radians(),
|
||||
}),
|
||||
AxisOffset::None,
|
||||
ragdoll,
|
||||
@@ -710,9 +710,9 @@ impl RagdollPreset {
|
||||
left_leg,
|
||||
"RagdollLeftFootLeftLegBallJoint",
|
||||
Some(BallJointLimits {
|
||||
x: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
y: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
z: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
x: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
y: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
z: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
}),
|
||||
AxisOffset::Y(-foot_radius),
|
||||
ragdoll,
|
||||
@@ -725,9 +725,9 @@ impl RagdollPreset {
|
||||
hips,
|
||||
"RagdollLeftUpLegHipsBallJoint",
|
||||
Some(BallJointLimits {
|
||||
x: -80.0f32.to_radians()..80.0f32.to_radians(),
|
||||
y: -80.0f32.to_radians()..80.0f32.to_radians(),
|
||||
z: -80.0f32.to_radians()..80.0f32.to_radians(),
|
||||
x: (-80.0f32).to_radians()..80.0f32.to_radians(),
|
||||
y: (-80.0f32).to_radians()..80.0f32.to_radians(),
|
||||
z: (-80.0f32).to_radians()..80.0f32.to_radians(),
|
||||
}),
|
||||
AxisOffset::None,
|
||||
ragdoll,
|
||||
@@ -746,9 +746,9 @@ impl RagdollPreset {
|
||||
right_leg,
|
||||
"RagdollRightFootRightLegBallJoint",
|
||||
Some(BallJointLimits {
|
||||
x: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
y: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
z: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
x: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
y: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
z: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
}),
|
||||
AxisOffset::Y(-foot_radius),
|
||||
ragdoll,
|
||||
@@ -812,9 +812,9 @@ impl RagdollPreset {
|
||||
left_fore_arm,
|
||||
"RagdollLeftForeArmLeftHandBallJoint",
|
||||
Some(BallJointLimits {
|
||||
x: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
y: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
z: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
x: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
y: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
z: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
}),
|
||||
AxisOffset::X(hand_radius),
|
||||
ragdoll,
|
||||
@@ -851,9 +851,9 @@ impl RagdollPreset {
|
||||
right_fore_arm,
|
||||
"RagdollRightForeArmRightHandBallJoint",
|
||||
Some(BallJointLimits {
|
||||
x: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
y: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
z: -45.0f32.to_radians()..45.0f32.to_radians(),
|
||||
x: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
y: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
z: (-45.0f32).to_radians()..45.0f32.to_radians(),
|
||||
}),
|
||||
AxisOffset::X(-hand_radius),
|
||||
ragdoll,
|
||||
|
||||
@@ -135,7 +135,7 @@ impl Default for FlyingCameraController {
|
||||
pitch: Default::default(),
|
||||
speed: 5.0.into(),
|
||||
sensitivity: 0.7.into(),
|
||||
pitch_limit: (-89.9f32.to_radians()..89.9f32.to_radians()).into(),
|
||||
pitch_limit: ((-89.9f32).to_radians()..89.9f32.to_radians()).into(),
|
||||
move_forward_key: KeyBinding::Some(KeyCode::KeyW).into(),
|
||||
move_backward_key: KeyBinding::Some(KeyCode::KeyS).into(),
|
||||
move_left_key: KeyBinding::Some(KeyCode::KeyA).into(),
|
||||
|
||||
Reference in New Issue
Block a user