Ah I am glad is works for you now. yes the skeleton joint is a great addition to the engine since 3.13
is gives you the power of exact constraint solver for almost any conceivable contraction of joints and bodies. You have to be careful, like Spiderman said: "Great power requires great responsibility
"
because with exact solver also comes back the possibility of explosion if you connect loops that lead to singular mass matrices. This is a problem that iterative solver engine do not have because when solving an ill condition system with an iterative solver, the solver convergence rate becomes zero or even diverge.
I suggest that, if you are running at 30 fps then you should probably use this function
NewtonSetNumberOfSubsteps (world, 2)
this is like running two update but the are some saving, and in the future this will be even better because the solve will have two passes but not all the passes requires the same rate.
in 3.15 there will be an option so make collision executes one step, all of the solve overhead does one step, and only the solver does the sub stepping. in fact I would use
- Code: Select all
NewtonSetNumberOfSubsteps (world, 4)
which is the equivalent to run at 120 fps.
you will be surprised how not much slower it is versus how much accuracy increases quadratically.
can you post the file and line function of that bug that you'd mentioned?
remember you can alway subclass from those base classes and override any parameter you want.
in fact what I do is that I make a joint class that wrapper that contain an pointer to the engine class something like.
- Code: Select all
class myJoint
{
public:
myJoint (CustomJoint* joint)
:m_joint(joint)
{
...
...
}
virtual ~myJoint ()
{
delete m_joint;
}
CustomJoint* m_joint;
}
Or some variant of that, this is what dNewton was meant to be but mot people prefer to use the c interface and the custom joints directly.
also, that way you separate your app from the physics engine and later you can even change the physics engine without affecting your app to much, if you decide to do later.