refactor(component): physics components load in the client's phases

The physics row's collision group in LoadDataFromTemplate and the level's
CollisionGroupID in LoadConfigData; each physics type then reads its own level
keys and makes its physics after that, in the same order as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-01 08:34:28 -05:00
parent a4f1b974c8
commit 43b99b730f
10 changed files with 42 additions and 5 deletions

View File

@@ -19,6 +19,11 @@ RigidbodyPhantomPhysicsComponent::RigidbodyPhantomPhysicsComponent(Entity* paren
m_Position = m_Parent->GetDefaultPosition();
m_Rotation = m_Parent->GetDefaultRotation();
m_Scale = m_Parent->GetDefaultScale();
}
// After the physics config: its physics
void RigidbodyPhantomPhysicsComponent::LoadConfigData() {
PhysicsComponent::LoadConfigData();
if (m_Parent->GetVar<bool>(u"create_physics")) {
m_dpEntity = CreatePhysicsLnv(m_Scale, ComponentType);