JoltPhysics3D: Allow to construct components without using the system

This commit is contained in:
SirLynix
2023-07-23 13:05:33 +02:00
parent 20f000c8dc
commit c081811760
14 changed files with 167 additions and 87 deletions

View File

@@ -6,6 +6,17 @@
namespace Nz
{
inline JoltCharacterComponent::JoltCharacterComponent(const JoltCharacter::Settings& settings)
{
m_settings = std::make_unique<JoltCharacter::Settings>(settings);
}
inline void JoltCharacterComponent::Construct(JoltPhysWorld3D& world)
{
assert(m_settings);
Create(world, *m_settings);
m_settings.reset();
}
}
#include <Nazara/JoltPhysics3D/DebugOff.hpp>