Ragdoll Corpses in Water: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Geep (talk | contribs)
mNo edit summary
Geep (talk | contribs)
Update on nodrop 1 and T pose
Line 14: Line 14:
The other way is to add the spawnarg “nodrop 1”. Place the corpse vertically exactly where you want it at the surface (or in the water column).
The other way is to add the spawnarg “nodrop 1”. Place the corpse vertically exactly where you want it at the surface (or in the water column).
If you place the corpse at the water surface, it won’t really float (i.e., bob), but if placed low in the water surface (“awash”), it looks not bad.
If you place the corpse at the water surface, it won’t really float (i.e., bob), but if placed low in the water surface (“awash”), it looks not bad.
[https://forums.thedarkmod.com/index.php?/topic/10003-so-what-are-you-working-on-right-now/page/334/&tab=comments#comment-446196 PranQster found the first method preferable], because "nodrop 1" forces the ragdoll into a "T pose". There's more related to this below.


== Corpse-Player Interaction ==
== Corpse-Player Interaction ==
Unlike with a Movable entity, if you approach the cadaver closely, it will not move. It usually seems that you can swim through the body, but also sometimes climb atop it. The setting of the “solid” spawnargs doesn’t appear to have much effect.
Unlike with a Movable entity, if you approach the cadaver closely, it will not move. With "nodrop 1", it usually seems that you can swim through the body, but also sometimes climb atop it. The setting of the “solid” spawnargs doesn’t appear to have much effect.
=== If you want the player to not move the corpse. ===
=== If you want the player to not move the corpse. ===
Set inherited spawnarg "frobbable" to "0".
Set inherited spawnarg "frobbable" to "0".
Line 23: Line 25:
There’s also “ground_when_dragged”, that you can toggle to see what water behavior you prefer. This latter may be of no concern, if the main reason to frob is to shoulder the corpse and bring it to dry land.  Conversely, frob-and-drag by the selected body part provides some entertaining thrashing and splashing (particularly if some other body part is clipped into, say, a wall).
There’s also “ground_when_dragged”, that you can toggle to see what water behavior you prefer. This latter may be of no concern, if the main reason to frob is to shoulder the corpse and bring it to dry land.  Conversely, frob-and-drag by the selected body part provides some entertaining thrashing and splashing (particularly if some other body part is clipped into, say, a wall).


In any event, once released/unfrobbed, a corpse will quickly sink, typically beyond the default re-frob range unless you swim back down to it (or extend the frob range).
In any event, once released/unfrobbed in deep water, a corpse will quickly sink, typically beyond the default re-frob range unless you swim back down to it (or extend the frob range).
=== Avoid frobbable props ===
=== Avoid frobbable props ===
Keys and other attachable props seem to be problematic, because:
Keys and other attachable props seem to be problematic, because:
Line 31: Line 33:
== Other Issues ==
== Other Issues ==
=== Corpse Pose ===
=== Corpse Pose ===
When you create and place a ragdoll in DR, the DR pose - hands at sides - may appear in the game as well. But sometimes, the in-game ragdoll will revert to a “T pose”, and as a result, an arm might clip into, for instance, a nearby wall. Position the ragdoll accordingly.
When you create and place a ragdoll in DR, the DR pose - hands at sides - may appear in the game as well. But with the "nodrop 1" method, as mentioned above, the in-game ragdoll will revert to a “T pose”. As a result, an arm might clip into, for instance, a nearby wall. Position the ragdoll accordingly.


If the initial spawn pose is important to you (beyond facing up or down), consider using one of two ''in-game'' methods:
If the initial spawn pose is important to you (beyond facing up or down), consider using one of two ''in-game'' methods (probably without "nodrop 1"):
* Drag around a frobable ragdoll into a favorable position with a mouse, then save that pose.
* Drag around a frobable ragdoll into a favorable position with a mouse, then save that pose.
* Use the Articulate Figure editor. Invoke it by “editAFs”, then select your ragdoll model.
* Use the Articulate Figure editor. Invoke it by “editAFs”, then select your ragdoll model.

Revision as of 19:17, 20 April 2020

By Geep, 2020, largely based on 2019 experiments for "Away 0: Airpocket"

A humanoid ragdoll corpse in water is possible, but keep your expectations modest.

The Fully-Sunken Corpse

By default, a ragdoll will immediately floor itself to the underlying worldspawn surface (e.g., “seafloor”). In doing so, it will ignore static_funcs with “noclipmodel 1” (and their collision surfaces). This effect can be desirable (e.g., for sea plants) or not (for anchors, rocks, sunken crates). If not, you may apply gambits like:

  • Clearing the seafloor debris
  • Adding clip brushes
  • Changing the seafloor debris to “noclipmodel 0” (or reverting func_statics to worldspawn)
  • Setting the ragdoll’s hidden spawnarg “solid” to “1”. (Caveat: if the ragdoll is frobbable, after a frob/release, this effect seems less dependable.)

The Floating Corpse

Given the foregoing, one way to float a corpse is just to place a slab of invisible worldspawn below it.

The other way is to add the spawnarg “nodrop 1”. Place the corpse vertically exactly where you want it at the surface (or in the water column). If you place the corpse at the water surface, it won’t really float (i.e., bob), but if placed low in the water surface (“awash”), it looks not bad.

PranQster found the first method preferable, because "nodrop 1" forces the ragdoll into a "T pose". There's more related to this below.

Corpse-Player Interaction

Unlike with a Movable entity, if you approach the cadaver closely, it will not move. With "nodrop 1", it usually seems that you can swim through the body, but also sometimes climb atop it. The setting of the “solid” spawnargs doesn’t appear to have much effect.

If you want the player to not move the corpse.

Set inherited spawnarg "frobbable" to "0".

If you want the player to move the corpse

Leave "frobbable" at "1". There’s also “ground_when_dragged”, that you can toggle to see what water behavior you prefer. This latter may be of no concern, if the main reason to frob is to shoulder the corpse and bring it to dry land. Conversely, frob-and-drag by the selected body part provides some entertaining thrashing and splashing (particularly if some other body part is clipped into, say, a wall).

In any event, once released/unfrobbed in deep water, a corpse will quickly sink, typically beyond the default re-frob range unless you swim back down to it (or extend the frob range).

Avoid frobbable props

Keys and other attachable props seem to be problematic, because:

  • They often end up inside the cadaver
  • Frobbing them can cause the cadaver to sink (even if the ragdoll’s frobbable is 0)
  • There seem to be more general problems with functional keys on ragdolls

Other Issues

Corpse Pose

When you create and place a ragdoll in DR, the DR pose - hands at sides - may appear in the game as well. But with the "nodrop 1" method, as mentioned above, the in-game ragdoll will revert to a “T pose”. As a result, an arm might clip into, for instance, a nearby wall. Position the ragdoll accordingly.

If the initial spawn pose is important to you (beyond facing up or down), consider using one of two in-game methods (probably without "nodrop 1"):

  • Drag around a frobable ragdoll into a favorable position with a mouse, then save that pose.
  • Use the Articulate Figure editor. Invoke it by “editAFs”, then select your ragdoll model.

For more about the difficulties and specialized techniques for controlling ragdoll spawn pose, see:

Sink Rate?

Ragdolls are not Movables, so the Entity inspector will not show inherited Movable spawnargs like “mass”, nor respond if “mass” is added. So post-frob sink/float rate and direction cannot be controlled; it is fixed at a rather rapid sink.

(If you use the in-game Articulated Figure editor on a ragdoll, note that “total mass” is exposed, as well as collision volumes and densities for individual body parts. Could these be used effectively for float control? Don’t know.)

See Also

Objects Floating in Water