From 3bf9bb3b13521c8bba4d559f308c5b2c04973df8 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Tue, 30 Oct 2012 15:44:16 +0000 Subject: BGE: Adding support for Bullet's collision masks. Each object now has a collision mask and a collision group. Object A and object B collide if object A's groups is in object B's mask and object B's group is in object A's mask. In other words, the group defines what the object is (collision wise) and the group defines what the object can collide with. The majority of this patch was provided by Kupoman with some edits from me and heavy testing by z0r. --- release/scripts/startup/bl_ui/properties_game.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'release/scripts/startup/bl_ui/properties_game.py') diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 5ff49a7d369..bf0c9eb762a 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -190,6 +190,14 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel): layout.operator("mesh.navmesh_reset") layout.operator("mesh.navmesh_clear") + if physics_type not in {'NO_COLLISION', 'OCCLUDE'}: + layout.separator() + split = layout.split() + + col = split.column() + col.prop(game, "collision_group") + col = split.column() + col.prop(game, "collision_mask") class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel): bl_label = "Collision Bounds" -- cgit v1.2.3