Ok how about me replacing the pick code in the SDK with a pick like in just like you are saying.
and I add the C export.
this is teh inetface I can thong of.
- Code: Select all
bool MovementCallback(Matrix&* target, float MaxStrength, *userData)
{
mouseInfo = (MouseInfo*) userData
if (mopsuestildown) {
// het you place the destination matrix and the streng of the joint
// copy teh destnation an dteh strent into target, max strendg
return 1
} else {
//to signal the joint wil be destroyed.
return 0 ;
}
....
}
// c inteface
Joint CreatePickJoint (body, MovementCallback, void* userData)
basicall you using like this
you shot a ray and find what object you want to pick
- Code: Select all
if (Mouseclick) {
Body = RacjPickBody()
if (body) {
CreateJoint (Body, movement, * mouseInfo);
}
}
is thsi what you are lokking for?
The reason the joint is the best way to go is that, i calcul et eteh exat force to make teh motion, but if teh body collide with somethomng the the collision generate force that will pass teh force limits.
alst teh rotation are alway exact, object placement liek buidl compelx strution is a give.
I do no really see any dow side. and quiet frnkle I do no kwno why no oen has done before.
you can actually make this king of object to behave as smooth as a feather, and very strong if you want.