From e5318e49fea9ac17c2c68dc81215d11a5083bc85 Mon Sep 17 00:00:00 2001 From: SirLynix Date: Wed, 9 Aug 2023 18:01:23 +0200 Subject: [PATCH] JoltPhysics3D/JoltRigidBody3D: Add constructors for settings --- include/Nazara/JoltPhysics3D/JoltRigidBody3D.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/Nazara/JoltPhysics3D/JoltRigidBody3D.hpp b/include/Nazara/JoltPhysics3D/JoltRigidBody3D.hpp index da772a559..8559c3685 100644 --- a/include/Nazara/JoltPhysics3D/JoltRigidBody3D.hpp +++ b/include/Nazara/JoltPhysics3D/JoltRigidBody3D.hpp @@ -103,6 +103,13 @@ namespace Nz struct DynamicSettings : CommonSettings { + DynamicSettings() = default; + DynamicSettings(std::shared_ptr collider, float mass_) : + mass(mass_) + { + geom = std::move(collider); + } + // Default values from Jolt JoltMotionQuality motionQuality = JoltMotionQuality::Discrete; Vector3f angularVelocity = Vector3f::Zero(); @@ -120,6 +127,11 @@ namespace Nz struct StaticSettings : CommonSettings { + StaticSettings() = default; + StaticSettings(std::shared_ptr collider) + { + geom = std::move(collider); + } }; protected: