Switched normalized function to try_normalized

This commit is contained in:
Sam 2021-03-27 19:05:48 -04:00
parent 4279720947
commit 46799daed2

View File

@ -52,7 +52,7 @@ impl CharacterBehavior for Data {
if input_is_pressed(data, self.static_data.ability_info.input) {
reset_state(self, data, &mut update);
} else {
update.vel.0 = update.vel.0.normalized()
update.vel.0 = update.vel.0.try_normalized().unwrap_or_default()
* update
.vel
.0