Retain pitch on no input

This commit is contained in:
Ludvig Böklin 2021-04-24 18:54:48 +02:00
parent a6dc8853da
commit 053fb9662f

View File

@ -73,8 +73,7 @@ impl CharacterBehavior for Data {
) )
}) })
}) })
.or_else(|| self.ori.look_dir().to_horizontal().map(Ori::from)) .unwrap_or_else(|| self.ori.uprighted());
.unwrap_or_default();
let rate = { let rate = {
let angle = self.ori.look_dir().angle_between(*data.inputs.look_dir); let angle = self.ori.look_dir().angle_between(*data.inputs.look_dir);