making a dynamic object static

hello guys. is there any python code that could make a dynamic object to become static?

because in the game i am making If a player tagged an enemy the enemy will freeze and will just become a static object.

I’m using blender 2.63 though.

I will be gratefull to any answers regarding this matter. thank you. :slight_smile:

I don’t believe you can change the physics type of an object during run time. You can create copies of your object that have different physics types and and then swap out the object when needed. However, the suspendDynamics method is probably more what you’re looking for and is an easier solution.

i am no pro, but what about replace mesh? i use it for my character to crouch. for this i just replace the bounding box mesh with an other box his mesh. the problem is when doing this u need to have the character box set as triangle mesh else it wont work. dunno if it stops moving becouse static objects can be moved around while giving it comands or when a script is attached to it.

thanks for the idea guys. and sorry for the late response.

I used the obj.suspendDynamics() method. to suspend the dynamics and the obj.restoreDynamics() to restore the dynamics of the object.

now how can i mark this thread as solved thread? sorry guys i’m new to this forum.