Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Szepe <HG1_public@gmx.net>2015-05-14 16:23:42 +0300
committerThomas Szepe <HG1_public@gmx.net>2015-05-14 16:23:42 +0300
commite7f2aec81bb752a5bc8f1474a4733a8d31fdd821 (patch)
treefff23d4c28319e58416407f29d3e3610b46f560d
parent1ccc417477f4b629557708ebdb456b374e8a33f2 (diff)
BGE: Add 'Lock Translation' for dynamic objects
The XYZ translation lock was missing for dynamic object. Reviewed By: panzergame
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py2
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index 33b19eb0752..6fb172bf1e3 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -100,7 +100,6 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
sub.prop(game, "damping", text="Translation", slider=True)
sub.prop(game, "rotation_damping", text="Rotation", slider=True)
- if physics_type == 'RIGID_BODY':
layout.separator()
split = layout.split()
@@ -111,6 +110,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
col.prop(game, "lock_location_y", text="Y")
col.prop(game, "lock_location_z", text="Z")
+ if physics_type == 'RIGID_BODY':
col = split.column()
col.label(text="Lock Rotation:")
col.prop(game, "lock_rotation_x", text="X")
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index dcc67205713..3670d79a01e 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -3535,9 +3535,10 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject
if (rbody)
{
+ rbody->setLinearFactor(ci.m_linearFactor);
+
if (isbulletrigidbody)
{
- rbody->setLinearFactor(ci.m_linearFactor);
rbody->setAngularFactor(ci.m_angularFactor);
}