Maybe you don't need to code a new joint and the library already contains all that you need?
If not...
Andazeus wrote:Is there any documentation on that?
Go down at 'Userdefines bilateral' at
http://newtondynamics.com/wiki/index.php5?title=JointsThere are no changes between 2.x and 3.x about this.
This doc alone won't help much. Take a look at JointLib source code too. It's always the SubmitConstraints method that is most interesting.
Start with CustomBallAndSocket, and see how positions are fused at 3 orthogonal planes, so the meet at a single 3D point.
Note that all Joint Lib code is based on the few Newton functions shown at wiki.
You can either add your own joint to the joint lib using its base class, or do completely on your own.
The User Joint is very flexible. I'm sure you can get what you want after you've got familiar with the basics.
I do not understand what you want exactly from your definition, but it schould by something like:
1. if blue object is polyhedra, find nearest polygon (check velocity on edge / vertex cases to pick proper neighbouring poly)
2. restrict movement to plane of that polygon (You can do easily after you understood ball socket)
3. use plane normal if you wanna constrain orientation too (see UpVector).
EDIT:
Depends on usecase, but wouldn't it be easier to just calculate the gravity force for each object in relation to its enviroment?
EDIT2:
Removed my buggy ellipsoid example.