Better turning

This commit is contained in:
Joshua Barretto 2023-05-24 23:25:25 +01:00
parent f986e0793d
commit 8e85ff98a6

View File

@ -605,7 +605,7 @@ pub fn handle_orientation(
(
Quaternion::rotation_y(x_diff.atan()) * Quaternion::rotation_x(y_diff.atan()),
(data.vel.0 - data.physics.ground_vel).dot(data.ori.to_horizontal().look_dir().to_vec()).max(3.0) * efficiency,
(data.vel.0 - data.physics.ground_vel).xy().magnitude().max(3.0) * efficiency,
)
} else {
(Quaternion::identity(), efficiency)