[ODE] A slider joint to bond an axis-aligned body with a rigid
bodygroup?
Jon Watte
hplus-ode at mindcontrol.org
Wed Oct 13 16:19:36 MST 2004
If you SetRotation, the slider joint will clearly try to compensate
for the error you introduce. This may counter-act some of the rotation
you introduce, and either act as a drag on movement, or introduce
enough energy into the system to make it explode. I can think of a
few work-arounds:
1) Apply torque to the capsule to keep it upright, rather than setting
the rotation. Use maybe 5 steps of look-ahead and a torque that's
proportional PLUS square proportional to the deviation from where
you want to be (with appropriate scaling factors).
2) Use an AMotor between the body and the static world. It sounds like
an AMotor is exactly what you really want, rather than to be
slamming orientations. The parameters need to be tuned based on
your current orientation, each step.
3) turn your body into a sphere that has the same diameter as the
total length of your ccylinder, when you start rag-dolling.
Cheers,
/ h+
-----Original Message-----
From: Megan Fox [mailto:shalinor at gmail.com]
Sent: Wednesday, October 13, 2004 1:02 PM
To: Jon Watte
Cc: ode at q12.org
Subject: Re: [ODE] A slider joint to bond an axis-aligned body with a
rigid bodygroup?
Glad to see I'm not completely insane for thinking that might be
possible... question though, do you suppose me manually
SetOrientation()'ing (and SetTorque(0)'ing) the player body every
frame is going to break the slider joint between the player body and
the intermediate body (meaning I'll need to get a force/counter-force
implementation of the same thing tweaked and going)? Or do you
suppose it shouldn't matter at all?
I've never really done work with joints, thus far... not sure how
tolerant they are to things like this?
-Megan
> That sounds like an interesting project! Here's what I can think
> of (having not actually gone that far in my character
> implementation):
>
> As you say, you need a slider plus a ball joint. Because you
> can't chain joints, you have to play some tricks, such as adding
> an intermediate body of small (but not negligible) mass to
> attach the slider to, then attach the ball joint between that
> intermediate body and the actual hip/pelvis body. Taking the hip
> mass and dividing it by two might work.
>
> Also, the rag doll may have a wierd center of mass if the body
> for the player capsule is very heavy -- you might want to reduce
> its mass substantially while doing the rag-dolling, and kicking
> it back up when you're done.
>
> Cheers,
>
> / h+
>
> -----Original Message-----
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Megan
> Fox
> Sent: Wednesday, October 13, 2004 12:32 PM
> To: ode at q12.org
> Subject: [ODE] A slider joint to bond an axis-aligned body with a rigid
> bodygroup?
>
> Let me try to explain exactly what I have: I have a player body which
> is forced to remain upright via direct control of torque and
> orientation (I know, I know, it isn't "fancy", but it works perfectly
> and never requires tweaking). I need to join this to the root of a
> collection of jointed rigid bodies via a slider joint.
>
> This slider joint must remain at the same alignment as the player
> body, but the root body of the collection attached at the other end
> can rotate about the point of the attachment (and of course the joints
> within the collection can bend and flex and whatever else they need to
> do).
>
> How would I go about implementing this? I guess what I need is sort
> of like a suspension + axle, but not quite - replace the axle with a
> balljoint and you're getting closer, but even then setting the
> orientation of the "top" body would seemingly break the construct?
>
>
More information about the ODE
mailing list