velocity fix

This commit is contained in:
telastrus 2019-08-08 10:42:23 -04:00
parent 2eac162ee4
commit 09b15e5278

View File

@ -569,7 +569,10 @@ impl Hud {
.set(self.ids.coordinates, ui_widgets);
// Player's velocity
let velocity_text = match debug_info.velocity {
Some(velocity) => format!("Velocity: {:.1}", velocity.0),
Some(velocity) => format!(
"Velocity: ({:.3}, {:.3}, {:.3})",
velocity.0.x, velocity.0.y, velocity.0.z
),
None => "Player has no Vel component".to_owned(),
};
Text::new(&velocity_text)