[Bf-blender-cvs] [e7f2aec] master: BGE: Add 'Lock Translation' for dynamic objects
Thomas Szepe
noreply at git.blender.org
Thu May 14 15:24:50 CEST 2015
Commit: e7f2aec81bb752a5bc8f1474a4733a8d31fdd821
Author: Thomas Szepe
Date: Thu May 14 15:23:42 2015 +0200
Branches: master
https://developer.blender.org/rBe7f2aec81bb752a5bc8f1474a4733a8d31fdd821
BGE: Add 'Lock Translation' for dynamic objects
The XYZ translation lock was missing for dynamic object.
Reviewed By: panzergame
===================================================================
M release/scripts/startup/bl_ui/properties_game.py
M source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index 33b19eb..6fb172b 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 dcc6720..3670d79 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);
}
More information about the Bf-blender-cvs
mailing list