From 0331c77df1669b59130c530ff356108421e400a2 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Sun, 29 Apr 2012 17:23:19 +0000 Subject: [PATCH] Fix for [#31166] 2.63 applyRotation() makes Dynamic and Rigid object spin very fast This bug was caused by r45902. CcdPhysicsController::RelativeRotate() was reading 2 values past the input because it was actually being passed a float[12] when it asked for a float[9] by KX_BulletPhysicsController::RelativeRotate(). Now KX_BulletPhysicsController::RelativeRotate() passes in a float[9] like it should have done to begin with. --- source/gameengine/Ketsji/KX_BulletPhysicsController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp index 9940b400527..f5926818e7d 100644 --- a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp +++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp @@ -121,8 +121,8 @@ void KX_BulletPhysicsController::RelativeTranslate(const MT_Vector3& dloc,bool l void KX_BulletPhysicsController::RelativeRotate(const MT_Matrix3x3& drot,bool local) { - float rotval[12]; - drot.getValue(rotval); + float rotval[9]; + drot.getValue3x3(rotval); CcdPhysicsController::RelativeRotate(rotval,local); }