summaryrefslogtreecommitdiff
path: root/CenterOfMass.cs
blob: 9acb727d9255f53dba14c8eea086a36e41f456e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using UnityEngine;

public class CenterOfMass : MonoBehaviour
{
	private void Start()
	{
		Rigidbody componentInParent = GetComponentInParent<Rigidbody>();
		componentInParent.centerOfMass = componentInParent.transform.InverseTransformPoint(base.transform.position);
	}

	private void Update()
	{
	}
}