feat: debug for all physics components and fix inspect by ldf key (#1848)

This commit is contained in:
David Markowitz
2025-07-19 22:08:18 -07:00
committed by GitHub
parent 4c42eea819
commit ba964932b7
15 changed files with 217 additions and 10 deletions

View File

@@ -10,9 +10,12 @@
#include "dpWorld.h"
#include "dpShapeBox.h"
#include "dpShapeSphere.h"
#include"EntityInfo.h"
#include "EntityInfo.h"
#include "Amf3.h"
RigidbodyPhantomPhysicsComponent::RigidbodyPhantomPhysicsComponent(Entity* parent, int32_t componentId) : PhysicsComponent(parent, componentId) {
RegisterMsg(MessageType::Game::GET_OBJECT_REPORT_INFO, this, &RigidbodyPhantomPhysicsComponent::OnGetObjectReportInfo);
m_Position = m_Parent->GetDefaultPosition();
m_Rotation = m_Parent->GetDefaultRotation();
m_Scale = m_Parent->GetDefaultScale();
@@ -55,3 +58,11 @@ void RigidbodyPhantomPhysicsComponent::SpawnVertices() const {
}
PhysicsComponent::SpawnVertices(m_dpEntity);
}
bool RigidbodyPhantomPhysicsComponent::OnGetObjectReportInfo(GameMessages::GameMsg& msg) {
PhysicsComponent::OnGetObjectReportInfo(msg);
auto& reportInfo = static_cast<GameMessages::GetObjectReportInfo&>(msg);
auto& info = reportInfo.subCategory->PushDebug("Rigidbody Phantom Info");
info.PushDebug<AMFDoubleValue>("Scale") = m_Scale;
return true;
}