Jump to content
The Dark Mod Forums

Ragdoll Props


Springheel

Recommended Posts

I've been doing some looking into ragdoll objects (swinging lights, hanging signs, etc). A lot of it is still over my head. For starters, how do you attach an md5mesh to world geometry? A light, for example...how do you make sure it stays connected to the ceiling when hit?

 

I found this in an AF file for a swinging sign, looks like it could be related...anyone know what it means?

 

fixed "wall" {
body1 "rod"
body2 "world"
}

Link to comment
Share on other sites

I've been doing some looking into ragdoll objects (swinging lights, hanging signs, etc). A lot of it is still over my head. For starters, how do you attach an md5mesh to world geometry? A light, for example...how do you make sure it stays connected to the ceiling when hit?

 

I found this in an AF file for a swinging sign, looks like it could be related...anyone know what it means?

 

fixed "wall" {
body1 "rod"
body2 "world"
}

 

from what I know of other engines, you typically have attachment point references that are ususally special data types or just "dummy bones" on a mesh and then you can attach them to other bone based meshes and then usually to some sort of static world entity.

I'm in yur forumz,

Makin' them frobbable.

Link to comment
Share on other sites

Heh, I've managed to get a ragdoll lantern working. I took one of the base D3 hanging lanterns and basically copied the weights and skeleton onto one of our own models. The size of the AF dimensions don't match exactly, so if you shoot the bottom of the lantern the arrow goes right through...I'll have to figure out the AF editor, which I've never used. Otherwise, it's pretty good. :)

 

I'll upload what I've got to SVN so you can try it out.

 

We'll have to decide whether we want to go this route for hanging objects or not, as there is definitely a small performance hit when it's in motion, and it also means the length of chain has to be set in advance.

 

Oh, there must be something wrong with the def file, however, since this is what it looks like in the editor (fine in game though):

 

af7.jpg

Link to comment
Share on other sites

I've been doing some looking into ragdoll objects (swinging lights, hanging signs, etc). A lot of it is still over my head. For starters, how do you attach an md5mesh to world geometry? A light, for example...how do you make sure it stays connected to the ceiling when hit?

 

I found this in an AF file for a swinging sign, looks like it could be related...anyone know what it means?

 

fixed "wall" {
   body1 "rod"
   body2 "world"
  }

 

Taken off of iddevnet :

 

4. Constraints

 

Several constraints can be used to connect the bodies of an articulated figures. A constraint is specified with a structure as follows: constraintType "name" {

key params

}

The constraintType is one of the following constraint types:

  • ballAndSocketJoint
  • universalJoint
  • hinge
  • spring

For each constraint two bodies are specified which are connected by the constraint. These bodies are specified with the body1 and body2 key. body1 "name"

body2 "name"

The body2 key may point to the special body called "world" and in this case the constraint will connect body1 to the world.

 

Other than the two connected bodies, each constraint has a number of settings specific to the constraint type as listed below.

 

Maybe the "fixed" constraint is just not documented on there, if you found it in use on an existing AF.

Link to comment
Share on other sites

Yeah, fixed constraint is like a bind. It's like you've taken a spike and nailed the two things together so that they can't move at all with respect to eachother.

 

With that in the AF, one joint will always be bound to the world. I think you can also use "bind" on an AF and it will bind dynamically to whatever entity you put in the "bind" spawnarg, and bind body #0 to that entity. This would be more useful since it doesn't restrict it to just the world, you could have a swinging lantern bound to a moving carraige, for example.

 

If you can't do that, we could easily add that in the code. I think I understand the constraint-adding code well enough to make a simple spawnarg that adds a fixed constraint to something on spawn. But I believe the bind spawnarg will already do that. If you want to bind a body in the AF other than body #0 to something, then I think we will need extra code. I have some old experimental code that lets you do that ingame if we decide that we need that.

Link to comment
Share on other sites

I'm finishing up a new head, but I'll come back to this. The swinging sign isn't working for me yet, so I'll have to do some tests.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...