diff --git a/src/actor.rs b/src/actor.rs index 1be6464..2e2894b 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -560,13 +560,7 @@ fn handle_wants_maxvelocity( } fn handle_wants_lookat( - mut query: Query<( - &Position, - &mut Rotation, - &Transform, - &mut ExternalTorque, - &WantsToLookAt, - )>, + mut query: Query<(&Position, &mut Rotation, &Transform, &WantsToLookAt)>, q_playercam: Query<&Position, With>, id2pos: Res, ) { @@ -577,7 +571,8 @@ fn handle_wants_lookat( return; }; - for (pos, mut rot, trans, mut _torque, target_id) in &mut query { + // TODO: use ExternalTorque rather than hard-resetting the rotation + for (pos, mut rot, trans, target_id) in &mut query { let target_pos = if target_id.0 == cmd::ID_SPECIAL_PLAYERCAM { player_pos } else if let Some(target_pos) = id2pos.0.get(&target_id.0) {