Walking Ragdoll?

I am pretty new to programming games and am considering making some mech warrior tests.  I would like to have all of the robots as walking ragdolls so that they react to impact realistically, but cannot think of a non-hacky  way of doing things.  Since really only the feet need to move, and it doesn't need to look natural I am considering having the body "float" with an upward force, and the feet be heavy enough to hold it down, they just have the legs move in a predetermined way, but I am not really sure how this is normally done, and couldn't find much written on it.  I would prefer to avoid complexity.

691175002 said:

I would prefer to avoid complexity.

hmm, then don't use a ragdoll :wink:

Controlling a ragdoll to behave physically is complicated - what about using an animated Mech (where animation comes from your modeler) and only detecting collisions for limbs, body etc. individually?

You can set the Limit of the axis of the physical Joints. when you call setPostionMinimum and Maximum with the same value. the Joint is fix.

I worked a short time with this Ragdoll, if you set all Degrees to Zero, the doll stand in the PhysicalRoom and doesnt move. But I tried to get ich walk like a Human, so Joints needed more Axis then one, and in ODE you cant control these Joints.



But for a RobotWalk it could be makeable, if you use BezierCurves for Interpolation, it can look quite smooth.

.:emp...hellg:. said:

so Joints needed more Axis then one, and in ODE you cant control these Joints.

you can, but it's really complex to get nice robot-like (or even human-like) movement

ohh yes!! or with inverse Kinematics  :slight_smile:



but me would interest, how to put the ready animation to ODE? You dont work with Joints then?

I am trying to think of a stable way of making the mech walk believably and respond to impacts and crashing into things without adding excessive complexity.  I think I will create an invisible box or something and fix the ragdoll to it so that I can control the position of the ragdoll by applying forces to the box.  I will just make the legs follow a predefined path by setting fixed joints so that it looks like its walking, and walking into things or getting hit will make it flop around a bit without falling over.



Is there any way to prevent an object from moving rotationally?



I can't figure out how Joint.setSpring(); works.  I have tried a bunch of different numbers but the joint always acts the same for a rotational joint.  Does it only work for translational joints?

.:emp...hellg:. said:

but me would interest, how to put the ready animation to ODE?

You could simply make the mech a static node (so ODE does not control it), import the animations from file (e.g. Collada) and trigger different "hit" animations upon collisions. (So, yes, without joints)

691175002 said:

I can't figure out how Joint.setSpring(); works.  I have tried a bunch of different numbers but the joint always acts the same for a rotational joint.  Does it only work for translational joints?

Not sure which joints work (see ODE docs for erp/cfm, please), at least fixed and ball joint (no/all rotational axes) do work with springs. But I think for your mech you cannot really use springs for the rotational joints (would look very weired - like a rubber mech :P)

Ok, sounds good, I'll try it, in this way,



thanks irrisor