something wrong with the script, or something wrong with me?

I am using this hinge script, and it works fine exept that the framerate keeps dropping until it finally freezes. I got it from the 2.42 physics demo.

import PhysicsConstraints
import GameLogic

cont = GameLogic.getCurrentController()
scene = GameLogic.getCurrentScene()
#print dir(scene)

owner = cont.getOwner()

root = scene.getObjectList()[ “OB” + owner.root ]
#print dir(root)

point2point = 1
hinge = 2
#constraintType = point2point
constraintType = hinge

oid= owner.getPhysicsId()
rid = root.getPhysicsId()
pivotInAx=0
pivotInAy=-1
pivotInAz=1
axisInAx=1
axisInAy=0
axisInAz=0

PhysicsConstraints.createConstraint(oid,rid,constraintType,pivotInAx,pivotInAy,pivotInAz,axisInAx,axisInAy,axisInAz)

I haven’t used the hinge constraints yet, but if the script is slowing the game down so much, it should be generating errors to the console window. Give it a look and see.

should have though of that. i took it from a working file, so it must have slipped my mind. thanks blendenzo

Technically, if a file slows down gradually, it’s the cause of a continual supply of resources being expended (such as a psycho object adder). Maybe there’s a pulse happening that keeps adding identical constraints, which slows down and freezes the GE.