BGE: Add 'Lock Translation' for dynamic objects

The XYZ translation lock was missing for dynamic object.

Reviewed By: panzergame
This commit is contained in:
Thomas Szepe 2015-05-14 15:23:42 +02:00
parent 1ccc417477
commit e7f2aec81b
2 changed files with 3 additions and 2 deletions

View File

@ -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")

View File

@ -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);
}