diff --git a/AABB.cs b/AABB.cs index 6aee6ee..4d0c249 100644 --- a/AABB.cs +++ b/AABB.cs @@ -158,7 +158,7 @@ namespace Voxel { return new Vector3( (Min.X + Max.X) / 2, - (Min.Y + Max.Y) / 2, + Min.Y, (Min.Z + Max.Z) / 2 ); } diff --git a/Entity.cs b/Entity.cs index 408b93e..90bae7c 100644 --- a/Entity.cs +++ b/Entity.cs @@ -105,7 +105,7 @@ namespace Voxel OnGround = moveVector.Y != originalVector.Y && originalVector.Y < 0; - Position = new Vector3(body.GetCenter().X, body.Min.Y, body.GetCenter().Z); + Position = body.GetCenter(); } public void ApplyImpulse(Vector3 force)