Fixed IsCollisionEnabled having no affect.

[#] Fixed CheckCollision checking collisions even if collisions are disabled(IsCollisionEnabled = false)

Related issue:
fixes #164
This commit is contained in:
RaphaelIT7 2023-10-02 00:29:58 +02:00
parent 50cef39716
commit 3cd50693d0
1 changed files with 2 additions and 0 deletions

View File

@ -157,6 +157,8 @@ bool JoltPhysicsPlayerController::WasFrozen()
static void CheckCollision( JoltPhysicsObject *pObject, JPH::CollideShapeCollector &ioCollector, JPH::BodyFilter &ioFilter )
{
if (!pObject->IsCollisionEnabled()) { return; } // If we have no collisions, we have nothing to check.
JPH::PhysicsSystem *pSystem = pObject->GetEnvironment()->GetPhysicsSystem();
// TODO(Josh): Make a PLAYER ONLY layer that will only collide with MOVING ONLY annd