I want to create some constraints in BGE with phyton (between a soft body and a dynamic object) and then remove them after a while. I tried this code to save constraint's id:
import bge
p = bge.logic.getCurrentScene().objects["Plane"].getPhysicsId()
o = bge.logic.getCurrentController().owner
o["c"] = bge.constraints.createConstraint(o.getPhysicsId(), p, 1, 0.0, 0.0, 0.0).getConstraintId()
the constraint created and all of parameters seems to be correct but getConstraintId always returns zero and I can't understand why?