From 18873ffbf1729f6d941d7e6f16f81770cf710409 Mon Sep 17 00:00:00 2001 From: Stephen Imhoff Date: Fri, 19 Feb 2021 19:41:19 +0000 Subject: [PATCH] Add use of TransformState::make_pos_quat() in some places (#1116) Fixes #1116 --- panda/src/bullet/bullet_utils.cxx | 5 ++--- pandatool/src/assimp/assimpLoader.cxx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/panda/src/bullet/bullet_utils.cxx b/panda/src/bullet/bullet_utils.cxx index 74ee184594..5eac713a13 100644 --- a/panda/src/bullet/bullet_utils.cxx +++ b/panda/src/bullet/bullet_utils.cxx @@ -118,10 +118,9 @@ btTransform LMatrix4_to_btTrans(const LMatrix4 &m) { */ LMatrix4 btTrans_to_LMatrix4(const btTransform &trans) { - return TransformState::make_pos_quat_scale( + return TransformState::make_pos_quat( btVector3_to_LVector3(trans.getOrigin()), - btQuat_to_LQuaternion(trans.getRotation()), - LVector3(1.0f, 1.0f, 1.0f))->get_mat(); + btQuat_to_LQuaternion(trans.getRotation()))->get_mat(); } /** diff --git a/pandatool/src/assimp/assimpLoader.cxx b/pandatool/src/assimp/assimpLoader.cxx index 9801d6b13b..3e48b9d809 100644 --- a/pandatool/src/assimp/assimpLoader.cxx +++ b/pandatool/src/assimp/assimpLoader.cxx @@ -1035,7 +1035,7 @@ load_light(const aiLight &light) { LPoint3 pos (light.mPosition.x, light.mPosition.y, light.mPosition.z); LQuaternion quat; ::look_at(quat, LPoint3(vec.x, vec.y, vec.z), LVector3::up()); - plight->set_transform(TransformState::make_pos_quat_scale(pos, quat, LVecBase3(1, 1, 1))); + plight->set_transform(TransformState::make_pos_quat(pos, quat)); break; } // This is a somewhat recent addition to Assimp, so let's be kind to those