this thread is the offspring of this thread I posted on blenderartist...
http://blenderartists.org/forum/showthread.php?t=99846
So I downloaded the demo with the ragdolls where you can break the joints with a mouse and managed to get a grip of what is currently happening...
I am currently trying to adapt this demo to my need.
Here is a small test I am doing. The goal is to press a key and the object OBCube.001 will fall...
http://uploader.polorix.net//files/265/ ... estc.blend
Here is the python script that is assigned as a controller to Cube.001.
Code: Select all
import GameLogic as gl
import PhysicsConstraints as pc
cont=gl.getCurrentController()
owner=cont.getOwner()
kpress=cont.getSensor("kpress")
if kpress.isPositive():
pc.removeConstraint(#don't know how I can get the constraint ID from the Constraint stack...#)
The problem I have is to get the constraint ID from Cube.001 knowing that the constraint has been created using Blender GUI. My guess is, once I have this ID, this little script will sever the joint between Cube.001 and Cube making me a happy blenderist --->
So the main question is, where can I get this ID when the constraint has been built with the GUI?
Optional question (only useful if there is no straight answer to the main question)
In the demo the joints are created in python using createConstraint. If I have no choice, I will do it that way, but in that case, what should I do to place the joint as I wish? (make it hinge, modifie the pivot position etc...)
Thanks
