Hi,
If it's easy, could some guru describe what needs to be done to create a custom joint type:
- what methods have to be implemented ?
- when are they called and what should they affect (and how) ?
Thanks in advance if someone can help !
Here are my first assumptions, after looking at some existing joints.
Please feel free to correct them, or give any other kind of relevant information.
- m_sweep indicates where a body is about to move in the current step
- In a step, the engine first simulates as if joints did not exist.
- Then InitVelocityConstraints is called once. You (as joint implementer) can do whatever you wish in this method, there is no "contract".
- Then SolveVelocityConstraints and SolvePositionConstraints are called potentially several times in the step. Their goal is to alter m_sweep, m_linearVelocity, and m_angularVelocity of the bodies.
- Only the joint has to be satisfied by these alterations, the engine itself does not care
Many thanks in advance !