Guest User

AutoConnectJoint.cs

a guest
Jun 22nd, 2020
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.27 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class AutoConnectJoint : MonoBehaviour
  6. {
  7.     void Awake()
  8.     {
  9.         GetComponent<ConfigurableJoint>().connectedBody = transform.parent.GetComponent<Rigidbody>();
  10.     }
  11. }
Add Comment
Please, Sign In to add comment