Fixed AABB GetCenter to use Min.Y
This commit is contained in:
2
AABB.cs
2
AABB.cs
@@ -158,7 +158,7 @@ namespace Voxel
|
|||||||
{
|
{
|
||||||
return new Vector3(
|
return new Vector3(
|
||||||
(Min.X + Max.X) / 2,
|
(Min.X + Max.X) / 2,
|
||||||
(Min.Y + Max.Y) / 2,
|
Min.Y,
|
||||||
(Min.Z + Max.Z) / 2
|
(Min.Z + Max.Z) / 2
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ namespace Voxel
|
|||||||
|
|
||||||
OnGround = moveVector.Y != originalVector.Y && originalVector.Y < 0;
|
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)
|
public void ApplyImpulse(Vector3 force)
|
||||||
|
|||||||
Reference in New Issue
Block a user