Fixed AABB GetCenter to use Min.Y

This commit is contained in:
max
2026-03-24 20:50:46 +01:00
parent 94605acc3a
commit 8d649e1b91
2 changed files with 2 additions and 2 deletions

View File

@@ -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
);
}

View File

@@ -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)