mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Made NPC movement smoother
Former-commit-id: 105908cf0118113408acd5ad7dce191fe405f88f
This commit is contained in:
parent
1df7d0080f
commit
247ba6621a
@ -22,7 +22,7 @@ impl<'a> System<'a> for Sys {
|
||||
*bearing += Vec2::new(
|
||||
rand::random::<f32>().fract() - 0.5,
|
||||
rand::random::<f32>().fract() - 0.5,
|
||||
) - *bearing * 0.05 - pos.0 * 0.001;
|
||||
) * 0.1 - *bearing * 0.01 - pos.0 * 0.0002;
|
||||
|
||||
if bearing.magnitude_squared() != 0.0 {
|
||||
control.move_dir = bearing.normalized();
|
||||
|
Loading…
Reference in New Issue
Block a user