Changing the physics dynamic options in game?

Hey everyone!
Well I’m trying to change my player physics in game such as the Damping translation option. I assume I have to access the bpy module but I never got it to work.

how can I manipulate this in game?

Never use the bpy in the game engine. The bpy module can’t be imported in Runtime. As far as I know there’s no handle for damping physics translation in the bge. Check the Blender API just to be sure.

oh man! I didnt find anything… edit object don’t have such a thing too.

Just spawn an identical object that is the new physics type?(replace the item?)

You can use linVelocityMax to set the maximum speed of a dynamic object, which can effectively cause a near full stop. You cant set it to zero as that makes it have no limit rather than stopping it. Here is an example;

def dampspeed():
    scene = logic.getCurrentScene()
    cont = logic.getCurrentController()
    own = cont.owner
    for obj in scene.objects:
        if "dampspeed" in obj:
            obj.linVelocityMax = 0.001

Any dynamic object with the property dampspeed will be affected depending on which sensor you use to activate this script.

thank alot! smart take on it. I can do that!