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);
}