Add support for Large Worlds in more engine systems
This commit is contained in:
@@ -27,7 +27,8 @@ void BoxCollider::SetSize(const Float3& value)
|
||||
|
||||
void BoxCollider::DrawPhysicsDebug(RenderView& view)
|
||||
{
|
||||
if (!view.CullingFrustum.Intersects(_sphere))
|
||||
const BoundingSphere sphere(_sphere.Center - view.Origin, _sphere.Radius);
|
||||
if (!view.CullingFrustum.Intersects(sphere))
|
||||
return;
|
||||
if (view.Mode == ViewMode::PhysicsColliders && !GetIsTrigger())
|
||||
DebugDraw::DrawBox(_bounds, _staticActor ? Color::CornflowerBlue : Color::Orchid, 0, true);
|
||||
|
||||
@@ -39,7 +39,8 @@ void CapsuleCollider::SetHeight(const float value)
|
||||
|
||||
void CapsuleCollider::DrawPhysicsDebug(RenderView& view)
|
||||
{
|
||||
if (!view.CullingFrustum.Intersects(_sphere))
|
||||
const BoundingSphere sphere(_sphere.Center - view.Origin, _sphere.Radius);
|
||||
if (!view.CullingFrustum.Intersects(sphere))
|
||||
return;
|
||||
Quaternion rot;
|
||||
Quaternion::Multiply(_transform.Orientation, Quaternion::Euler(0, 90, 0), rot);
|
||||
|
||||
@@ -69,7 +69,8 @@ void MeshCollider::DrawPhysicsDebug(RenderView& view)
|
||||
{
|
||||
if (CollisionData && CollisionData->IsLoaded())
|
||||
{
|
||||
if (!view.CullingFrustum.Intersects(_sphere))
|
||||
const BoundingSphere sphere(_sphere.Center - view.Origin, _sphere.Radius);
|
||||
if (!view.CullingFrustum.Intersects(sphere))
|
||||
return;
|
||||
if (view.Mode == ViewMode::PhysicsColliders && !GetIsTrigger())
|
||||
{
|
||||
|
||||
@@ -27,7 +27,8 @@ void SphereCollider::SetRadius(const float value)
|
||||
|
||||
void SphereCollider::DrawPhysicsDebug(RenderView& view)
|
||||
{
|
||||
if (!view.CullingFrustum.Intersects(_sphere))
|
||||
const BoundingSphere sphere(_sphere.Center - view.Origin, _sphere.Radius);
|
||||
if (!view.CullingFrustum.Intersects(sphere))
|
||||
return;
|
||||
if (view.Mode == ViewMode::PhysicsColliders && !GetIsTrigger())
|
||||
DebugDraw::DrawSphere(_sphere, _staticActor ? Color::CornflowerBlue : Color::Orchid, 0, true);
|
||||
|
||||
@@ -88,7 +88,8 @@ bool SplineCollider::CanBeTrigger() const
|
||||
|
||||
void SplineCollider::DrawPhysicsDebug(RenderView& view)
|
||||
{
|
||||
if (!view.CullingFrustum.Intersects(_sphere))
|
||||
const BoundingSphere sphere(_sphere.Center - view.Origin, _sphere.Radius);
|
||||
if (!view.CullingFrustum.Intersects(sphere))
|
||||
return;
|
||||
if (view.Mode == ViewMode::PhysicsColliders && !GetIsTrigger())
|
||||
DebugDraw::DrawTriangles(_vertexBuffer, _indexBuffer, Color::CornflowerBlue, 0, true);
|
||||
|
||||
Reference in New Issue
Block a user