using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class JointConnectedBodySetter : MonoBehaviour 
{
	private void Awake()
	{
		GetComponent<HingeJoint>().connectedBody = transform.parent.GetComponent<Rigidbody>();
		Rigidbody rigidBody = GetComponent<Rigidbody>();
		rigidBody.centerOfMass = Vector3.zero;
		rigidBody.inertiaTensor = Vector3.one;
	}
}
