Sync speed (fake stuff)

Here’s an interesting problem I cannot find an approach to : I want to parent an object to a rotating wheel; but - as the child object is instantiated on the panel at a given position I want it to rotate with the panel AND keep its orientation (it’s a shadow); like a hanging cloth pinned on the edge of a wheel - it rotates with it but due to the gravitation, it still keeps its … verticality. See, my native language not being english I cannot put th problem into proper terms hence I cannot find or a solution.

I made it well so far - the only hiccup being that I cannot seem to sync the speed - to “fake” it perfectly. It always goes really fast so I had to slow it down but later on, when the speed increases it becomes visibly out of sync.

var wheel:Transform;
function Update () {
	var ShadowSync= wheel.GetComponent(level)._speed;
	transform.Rotate(Vector3.forward, ShadowSync/100);

}

A cheap fix is to child an empty to the wheel. That will give the location for your shadow. Then have the cloth script put itself there:

// on shadow:
Transform mountPoint;

// Not so sure about this line:
mountPoint = GameObject.Find("wheel").transform.Find("childEmpty"); // start

// in update. Put at rotating mountpoint:
transform.position = mountPoint.position;