cleanup
This commit is contained in:
parent
7a7b4422d1
commit
2409da8fed
|
@ -696,7 +696,7 @@ fn handle_wants_maxvelocity(
|
|||
}
|
||||
|
||||
fn handle_wants_lookat(
|
||||
mut query: Query<(&Position, &mut Rotation, &Transform, &WantsToLookAt), Without<Camera>>,
|
||||
mut query: Query<(&Position, &mut Rotation, &WantsToLookAt), Without<Camera>>,
|
||||
q_playercam: Query<&Position, With<PlayerCamera>>,
|
||||
q_cam: Query<&Transform, With<Camera>>,
|
||||
id2pos: Res<game::Id2Pos>,
|
||||
|
@ -713,7 +713,7 @@ fn handle_wants_lookat(
|
|||
};
|
||||
|
||||
// TODO: use ExternalTorque rather than hard-resetting the rotation
|
||||
for (pos, mut rot, trans, target_id) in &mut query {
|
||||
for (pos, mut rot, target_id) in &mut query {
|
||||
let target_pos: DVec3 = if target_id.0 == cmd::ID_SPECIAL_PLAYERCAM {
|
||||
cam_pos
|
||||
} else if let Some(target_pos) = id2pos.0.get(&target_id.0) {
|
||||
|
|
Loading…
Reference in a new issue