add 'static' entity body-type

This commit is contained in:
MihailRis
2024-07-29 15:45:28 +03:00
parent d6696b54cb
commit 2b7b68f3c2
7 changed files with 8 additions and 18 deletions
+1 -1
View File
@@ -411,7 +411,7 @@ void Entities::updatePhysics(float delta) {
auto view = registry.view<EntityId, Transform, Rigidbody>();
auto physics = level->physics.get();
for (auto [entity, eid, transform, rigidbody] : view.each()) {
if (!rigidbody.enabled) {
if (!rigidbody.enabled || rigidbody.hitbox.type == BodyType::STATIC) {
continue;
}
auto& hitbox = rigidbody.hitbox;