In the BGE, when you create a constraint, you can control various parameters about it (which are hopelessly obscure). For instance, if I want to set the maximum angle:
ob1['constraint'].setParam(3, -10, 10)
This gives the contraint a freedom of movement on the X axis rotation of a total of 20 degrees - 10 degrees each way.
Now, I want to impose a springiness within that range, so I can set a spring constant and damping with:
ob1['constraint'].setParam(15, self.stiffness, self.damping)
Now the contraint has angle limits of 10 degrees each way, and even if it’s not at the limit, forces will be applied to move the object back to zero degrees - with a controllable stiffness and damping.
Does anyone know if you can conrol this angle it is springy towards? For instance if I want a min and max angle of -10 and 10, but want it to be springy towards 5 degrees?
I don’t see anything obvious in the documentation, so was wondering if anyone had managed it or if it was possible.
I don’t want to manually apply an offsetting force either.