mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix loss of glider control when falling perfectly vertically
This commit is contained in:
parent
0810d8920f
commit
94b1d37fb7
@ -64,6 +64,7 @@ impl CharacterBehavior for Data {
|
||||
.and_then(|tgt_dir| {
|
||||
Dir::from_unnormalized(data.vel.0)
|
||||
.and_then(|moving_dir| moving_dir.to_horizontal())
|
||||
.or_else(|| self.ori.look_dir().to_horizontal())
|
||||
.map(|moving_dir| {
|
||||
Ori::from(tgt_dir).rolled_right(
|
||||
(1.0 - moving_dir.dot(*tgt_dir).max(0.0))
|
||||
|
Loading…
Reference in New Issue
Block a user