Hi, I’ve got a problem, I want to check some things in bge, I’ve prepared object in one layer(for example object name is “TEST”), object physics type is “STATIC”, I want to add this object to another layer, and change his physics type to “RIGID_BODY”, so it will fall down when added. When start a game, scripts run without errors, physics type of added object is changed, but object is behaving like “STATIC”, it’s hanging in one place and that’s all. Is it possible to change physics type in bge when game is running or I should use different method of changing physics type ? Thx in advance for any help. Below is sample code that I’m using to change object physics type.
scnScene = bge.logic.getCurrentScene() own = arrSensors[i].owner # arrSensors[i] sets earlier obj = scnScene.addObject("TEST",own,150) data.objects[obj.name].game.physics_type = 'RIGID_BODY' data.objects[obj.name].game.damping = 0.600 data.objects[obj.name].game.rotation_damping = 0.100 own.endObject()