📚
Deadly Dungeons
  • Initial page
  • Traps
    • Introduction
    • Trap Triggers
    • Raycast Triggers
    • Disabling Traps with Triggers
    • Trap
    • Trap Mechanism
      • Animator
      • Launcher
      • Particle (Trap Mechanism)
      • Physics
    • Effect Handlers
      • Audio Handler
      • Particle (Effect Handler)
      • Ray Handler
      • Custom Effect Handler
    • Damage System
      • Damage Source
      • IDamageable
      • Damage Result
    • Damageable Example
    • Utility
      • AutoConnect Joint
      • Texture Mover
Powered by GitBook
On this page

Was this helpful?

  1. Traps
  2. Utility

AutoConnect Joint

PreviousUtilityNextTexture Mover

Last updated 4 years ago

Was this helpful?

This script is useful when you have a skinned mesh with lots of bones that are parented to each other as a chain. Useful for long ropes and cables which use Physics simulation.

Quickly Connecting Character Joints

First, add a Character Joint and a Rigidbody to all the bones of the rope armature. You can select all the bones in the Hierarchy and add the components to all of them at once. The script will take care of the connected bodies.

Attach the script to the last bone, then click on the component menu, and choose Connect Joints Upward.

The bones are now connected, and you no longer need this component. You can tweak the joint parameters, rigid bodies and colliders all at once.

The swinging trap uses character joints and physics simulation for the cable.