mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'sam/center' into 'master'
Turn towards center of sprite instead of corner. See merge request veloren/veloren!2800
This commit is contained in:
commit
a193620375
@ -45,7 +45,7 @@ impl CharacterBehavior for Data {
|
||||
let mut update = StateUpdate::from(data);
|
||||
|
||||
let ori_dir = Dir::from_unnormalized(Vec3::from(
|
||||
(self.static_data.sprite_pos.map(|x| x as f32) - data.pos.0).xy(),
|
||||
(self.static_data.sprite_pos.map(|x| x as f32 + 0.5) - data.pos.0).xy(),
|
||||
));
|
||||
handle_orientation(data, &mut update, 1.0, ori_dir);
|
||||
handle_move(data, &mut update, 0.0);
|
||||
|
Loading…
Reference in New Issue
Block a user