Now renders func brush materials correclty

This commit is contained in:
Antoine Pilote
2024-08-31 12:33:48 -04:00
parent 8aa41a1bf8
commit f59a7e931f
8 changed files with 76 additions and 25 deletions

View File

@@ -131,6 +131,7 @@ namespace Nuake
const Quat& startRotation = transformComponent.GetGlobalRotation();
const auto collisionShape = CreateRef<Physics::ConvexHullShape>(hull);
auto rigidBody = CreateRef<Physics::RigidBody>(0.0f, startPosition, startRotation, startTransform, collisionShape, entity);
brushComponent.Rigidbody.push_back(rigidBody);
rigidBody->SetIsTrigger(brushComponent.IsTrigger);
@@ -321,6 +322,7 @@ namespace Nuake
}
Ref<Physics::PhysicShape> shape;
bool hasValidShape = true;
if (entity.HasComponent<CapsuleColliderComponent>())
{
const auto& capsuleColliderComponent = entity.GetComponent<CapsuleColliderComponent>();
@@ -343,7 +345,9 @@ namespace Nuake
}
else
{
continue;
hasValidShape = false;
Logger::Log("No shape was provided for character controller. Default one was provided.", "physics", WARNING);
shape = CreateRef<Physics::Capsule>(1.0f, 0.5f);
}
Physics::CharacterControllerSettings settings