diff --git a/test/Physics/EasyPhysics.cpp b/test/Physics/EasyPhysics.cpp index 20dd63fd..686b7095 100644 --- a/test/Physics/EasyPhysics.cpp +++ b/test/Physics/EasyPhysics.cpp @@ -129,7 +129,7 @@ void EasyPhysics::SetMass(float mass) if (m_rigid_body) { SetLocalInertia(m_mass); - m_rigid_body->setMassProps(mass, LOL2BT_VEC3(m_local_inertia)); + m_rigid_body->setMassProps(mass, m_local_inertia); } } diff --git a/test/Physics/LolBtPhysicsIntegration.h b/test/Physics/LolBtPhysicsIntegration.h index 85dc51c8..07f7f725 100644 --- a/test/Physics/LolBtPhysicsIntegration.h +++ b/test/Physics/LolBtPhysicsIntegration.h @@ -26,7 +26,7 @@ namespace lol #define LOL2BT_SIZE 0.5f #define BT2LOL_SIZE 2.0f -#define LOL2BT_VEC3(ELEMENT) (*(btVector3*)(&(ELEMENT))) +#define LOL2BT_VEC3(ELEMENT) btVector3((ELEMENT).x, (ELEMENT).y, (ELEMENT).z) #define BT2LOL_VEC3(ELEMENT) (*(lol::vec3*)(&(ELEMENT))) #define LOL2BT_QUAT(ELEMENT) btQuaternion((ELEMENT).x, (ELEMENT).y, (ELEMENT).z, (ELEMENT).w)