mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Made entity collisions z-dependent
This commit is contained in:
parent
71bf09d3b7
commit
c33892e8af
@ -268,6 +268,8 @@ impl<'a> System<'a> for Sys {
|
||||
|
||||
if diff.magnitude_squared() > 0.0
|
||||
&& diff.magnitude_squared() < collision_dist.powf(2.0)
|
||||
&& pos.0.z + 1.6 * scale > pos_other.0.z
|
||||
&& pos.0.z < pos_other.0.z + 1.6 * scale_other
|
||||
{
|
||||
vel.0 +=
|
||||
Vec3::from(diff.normalized()) * (collision_dist - diff.magnitude()) * 5.0;
|
||||
|
Loading…
Reference in New Issue
Block a user