using UnityEngine;
using System.Collections;

/*
 * Easily transform positions between object scopes
 */

namespace com.deeperbeige.lib
{
	public class Coords
	{
		// Finds position of holder in scope's local space
		public static Vector3 getLocal(GameObject holder,   GameObject scope) { return getLocal(holder.transform, scope.transform); }
		public static Vector3 getLocal(Transform  holderTx, Transform  scopeTx)
		{
			return scopeTx.InverseTransformPoint(holderTx.position);
		}
	}
}
