mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
More sensible turn rate in air
This commit is contained in:
parent
20509a7818
commit
7f3d9898db
@ -421,7 +421,14 @@ pub fn handle_orientation(
|
||||
// Angle factor used to keep turning rate approximately constant by
|
||||
// counteracting slerp turning more with a larger angle
|
||||
let angle_factor = 2.0 / (1.0 - update.ori.dot(target_ori)).sqrt();
|
||||
data.body.base_ori_rate() * efficiency * angle_factor
|
||||
data.body.base_ori_rate()
|
||||
* efficiency
|
||||
* angle_factor
|
||||
* if data.physics.on_ground.is_some() {
|
||||
1.0
|
||||
} else {
|
||||
0.2
|
||||
}
|
||||
};
|
||||
update.ori = update
|
||||
.ori
|
||||
|
@ -43,7 +43,6 @@ impl Animation for JumpAnimation {
|
||||
} else {
|
||||
x_tilt
|
||||
};
|
||||
println!("{} days", x_tilt);
|
||||
|
||||
next.head.position = Vec3::new(0.0, s_a.head.0, s_a.head.1);
|
||||
next.head.orientation = Quaternion::rotation_x(x_tilt * -0.5);
|
||||
|
Loading…
Reference in New Issue
Block a user