Locking an OdeHingeJoint

How do you lock(keep from rotating) an OdeHingeJoint?

Calling setAxis(0, 0, 0) doesn’t seem to work.

Thanks,
DangerOnTheRanger

Use setParamLoStop and setParamHiStop and set them to the same value. These control the limits of its rotation arc.

Thanks for the quick reply(2 problems you have answered for me in 1 day!)!

That seems like it locks the joint, but it still has not solved my actual problem(my fault for not just posting the problem).

Which is this: I construct an avatar out of 3D models(really simple boxes) at runtime.

I then translate the torso model(which the head, arm and leg models are jointed to) to move forwards.

I thought I could turn the avatar with torso.setHpr(), but that’s not so.

Do you know how to solve that?

That will probably depend specifically on your code and the relationship between the Panda nodes and ODE bodies.
When you say you are moving the torso model, do you mean the ODE body for the torso?

If you are doing some sort of ragdoll behaviour your Panda nodes should be transformed dependant on the ODE bodies, not the other way around.

On the other hand if you are using ODE for some sort of hitbox system where the ODE geoms move with the animation of the character then you shouldn’t need any ODE joints at all.

I’m moving the actual 3D model(so not the ODE body).
Although I’m moving the ODE body, with the 3D model.

I think what I want is closer to the latter(hitbox system), save for the fact that since the avatar is composed of multiple 3D models, I’m using ODE joints for connecting the models.

I’m using ODE joints to connect the models because I need to occasionally move the models, independent of the others(rotate them, etc…). I suppose I might be able to use a NodePath to do that, but I don’t know how…

What I really need is a hinge that is not affected by gravity, does not move unless explicitly told to, and will not react by moving if hit.

In essence, I don’t need a hinge, I need a bone!
I’ll see if Panda3D provides bones, or armature construction, outside of a 3D model, anyway.