sdraw_mods_cvr/ml_prm
2023-04-13 23:03:43 +03:00
..
.github Ragdoll controller public instance access 2023-04-10 15:36:51 +03:00
Properties New mod - PlayerRagdollMod 2023-04-08 02:51:46 +03:00
vendor/RootMotion New mod - PlayerRagdollMod 2023-04-08 02:51:46 +03:00
AvatarBoolParameter.cs Ragdolled avatar's animator boolean parameter 2023-04-13 15:59:49 +03:00
Main.cs Check for props game settings and world restrictions 2023-04-12 21:33:33 +03:00
ml_prm.csproj Ragdolled avatar's animator boolean parameter 2023-04-13 15:59:49 +03:00
ml_prm.csproj.user New mod - PlayerRagdollMod 2023-04-08 02:51:46 +03:00
ml_prm_editor_script.unitypackage Added a unity editor script to toggle ragdoll via animation on your avatar 2023-04-08 19:31:57 +01:00
RagdollController.cs Automatic recovery feature 2023-04-13 23:03:43 +03:00
RagdollToggle.cs Added a unity editor script to toggle ragdoll via animation on your avatar 2023-04-08 19:31:57 +01:00
RagdollTrigger.cs Removed PlayerLocal layer usage to avoid possible world maps problems 2023-04-11 10:17:32 +03:00
README.md Ragdolled avatar's animator boolean parameter 2023-04-13 15:59:49 +03:00
Settings.cs Automatic recovery feature 2023-04-13 23:03:43 +03:00
Utils.cs Check for props game settings and world restrictions 2023-04-12 21:33:33 +03:00

Player Ragdoll Mod

This mod turns player's avatar into ragdoll puppet.

Installation

Usage

  • Press R to turn into ragdoll and back.

Optional mod's settings with BTKUILib:

  • Switch ragdoll: turns into ragdoll state and back, made for VR usage primarily.
  • Use hotkey: enables/disables ragdoll state switch with R key; true by default.
  • Restore position: returns to position of ragdoll state activation upon ragdoll state exit; false by default.
  • Use gravity: enables/disables gravity for ragdoll; true by default.
    • Note: Forcibly enabled in worlds that don't allow flight.
  • Pointers reaction: enables ragdoll state when player collides with CVRPointer colliders of ragdoll type (avatars, props and world included); true by default.
  • Combat reaction: enables ragdoll state upon death in worlds with combat system; true by default.
  • Velocity multiplier: velocity force multiplier based on player's movement direction; 2.0 by default.
    • Note: Limited according to world's fly multiplier.
    • Note: Forcibly set to 1.0 in worlds that don't allow flight.
  • Movement drag: movement resistance; 2.0 by default.
  • Angular movement drag: angular movement resistance; 2.0 by default.
  • Reset settings: resets mod settings to default.

Available additional parameters for AAS animator:

  • Ragdolled: defines current ragdoll state; boolean.
    • Note: Can be set as local-only (not synced) if starts with # character.

Unity Editor Script

You can also trigger the ragdoll via animations on your avatar. To do this you need:

  • Download and import the ml_prm_editor_script.unitypackage into your unity project
  • Add the component Ragdoll Toggle anywhere inside of your avatar's hierarchy.

Now you can animate both parameters available:

  • Should Override: whether the animation should override the toggled state of the ragdoll.
  • Is On: whether the ragdoll state is On or Off (only works if Should Override is also On).


Note: In order to work the game object needs to be active and the component enabled.

Mods Integration

You can use this mod's functions within your mod. To do this you need:

  • Add mod's dll as reference in your project
  • Access ragdoll controller with ml_prm.RagdollController.Instance

Available methods:

  • bool IsRagdolled()
  • void SwitchRagdoll()

Notes

  • Slightly incompatible with Follow hips on IK override option in AvatarMotionTweaker.
  • Not suggested to activate fly mode with enabled ragdoll state.
  • If ragdoll state is enabled during emote, remote players see whole emote playing while local player sees ragdolling. It's tied to how game handles remote players, currently can be prevented with (choose one):
    • Renaming avatar emote animations to not have default name or containing Emote substring.
    • Holding any movement key right after activating ragdoll state.