I want to keep the yellow square in the same position relative to the purple box. So in this case to keep behind it, and it works.
But the yellow square wont stop spinning around it's own Y axis
transform.position = (player.transform.position + Vector3(0,0,-1));
transform.RotateAround (player.transform.position, Vector3.up, player.transform.eulerAngles.y);
![alt text][1]
[1]: /storage/temp/13611-purple.jpg
↧