From c3f2d144b237904e0ac0b293ec8230d6874f5708 Mon Sep 17 00:00:00 2001 From: Benau Date: Thu, 19 Apr 2018 11:46:49 +0800 Subject: [PATCH] Fix m_current_transform uninitialized --- src/physics/physical_object.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/physics/physical_object.cpp b/src/physics/physical_object.cpp index f43faa3cf..cae70b399 100644 --- a/src/physics/physical_object.cpp +++ b/src/physics/physical_object.cpp @@ -163,6 +163,10 @@ PhysicalObject::PhysicalObject(bool is_dynamic, m_reset_height = settings.m_reset_height; m_on_kart_collision = settings.m_on_kart_collision; m_on_item_collision = settings.m_on_item_collision; + m_current_transform.setOrigin(Vec3()); + m_current_transform.setRotation( + btQuaternion(0.0f, 0.0f, 0.0f, 1.0f)); + m_body_added = false; m_init_pos.setIdentity();