I want to know whether I can add the action, like walk, stand, dodge, into the ragdoll, because I saw in the “animation” part, it seems that only the rigid body (the model from XML file) can be created animation. I tried the same approach in ragdoll, but it doesn’t work. I think maybe there are some other special approaches to create animation into the ragdoll I overlooked?
Thanks in advance.
Sorry, I don’t understand. Anyway the RagDoll test plays an animation (the dance) and then switches the model to rag doll mode, what else do you want?
A ragdoll means that the physics system calculates the movement of all parts of the body in respect to an applied force. If you want to let a ragdoll walk you probably need tens of forces to make it not collapse and move forward. (Think of modern robotics and their failure to create real loooking walking robots).
You will have to do some sort of walking animation by hand (unfortunately).
If you want to let a ragdoll walk you probably need tens of forces to make it not collapse and move forward.
Just don't go that way.. Why simulate physics in the first place when you then need to build a system to counter-act it again.. The RagDollControl in jme3 is built in a way that you can play animations and the physics shapes will be moved accordingly, you only have to care about the collision with other objects (e.g. with a ghost node or character control).
I don’t know if I get what you want to say.
I did not recommend doing that in my post. I used the quoted part as a negative example.
Did you misunderstand me or did you say that my example is not as negative as I thought?^^
I agree with you, else I’d have -1’d you ;). I just wanted to make sure this wasn’t perceived as a “suggestion” ^^
Ok, now it makes sense
Thanks for your kindly discussion.
So whether I can assume that making a ragdoll to walk is impossible now?
(I mean walking like the human model (or rigid body) in TestOgreAnim.java in the tutorial sample.)
:? It is possible, look at TestBoneRagDoll.java, it could also be a walk animation instead of the dance animation.
Sorry, you may misunderstood what I mean. Let me explain more.
In TestBoneRagDoll.java, the human model has been already created in mesh.xml file, then the program imports the human model and then create animation in it.
What I want is to firstly create ragdoll model (exactly same as the one in the TestRagDoll.java ), and then create animation into this ragdoll model.
is that still okay?
Yes, if your model has bones and animation you can use it with the rag doll. You think backwards.
Oh, I know what you mean. But how can I add the bones into the ragdoll? I mean in java codes, instead of in XML file. Does the jme have some examples?
I think the TestBoneRagdoll.java is helpful. I’ll try it. Thanks very much for your kind helps.
I saw the “bone” in the TestBoneRagDoll.java, but I think it is still not what I want…
In the TestBoneRagDoll, the model can keep standing even without adding the bone.
And what I want is to make the ragdoll model in TestRagDoll.java to stand, instead of falling in the ground.
:facepalm: You have to create an animation!!